SlideShare a Scribd company logo
Task 1 is testing your file handling
& typing skills on RaspPi.
Step1/ open IDLE.

Task 2 is about Looping, Sleeping &
Moving the player with Python.
Step1/ Create a new python script

Step2/ Try to copy the code without
making any mistakes.

Step2/ Save it in

Step3/ Save it in

/home/pi/mcpi/api/python/mcpi

or change your old one!

/home/pi/mcpi/api/python/mcpi
as task1.py
Step4/ Go to

/home/pi/mcpi/

as task2.py
Step3/ Type in the code so that the
script repeatedly -

Waits for a bit.
& start MC

Step5/ Build a house like normal
Step6/ When you are ready for a
challenge—run the game (F5)

THEN
Teleports You!
Step4/ Press F5 & return to MC to
play with it.
Task 3 is practising your looping &
introducing 3D cords, vars & if.

Task 4 is about using the minecraft
chat window to show python vars.

Step1/ copy the code.

Step1/ copy the code.

Step2/ Test the script by digging.

Step2/ Test the script by moving
around on minecraft.

Step3/ How deep do u have 2 dig?
Change it.
Step4/ How high RU teleported?
Change it.
Step5/ Try to create a Wormhole.
Step6/ Attempt the extension task.
Tip: change xyz.y
to xyz.x
Find the xyz of your
minecraft home.

Step3/ What are all the numbers?
(Ext—Can you “format” them?)
Step4/ remember the if statement?
if xyz.y>some_number:

Step5/ Use the postToChat method
to send a funny message.
Tip: If height is greater than
50 then

say “Ha ha”
Task 5 builds things next to where
the player is currently standing

Task 6 introduces us to “for” loops.

Step1/ copy the code.

Step1/ copy the code.

Step2/ it may be easier to
understand the code if you press
enter after each comma.

Step2/ Make the Tower taller then
shorter.

Step3/ setBlock needs 2 things-

Step3/ Use a “nested” for loop to
build a wall.

An xyz position to build at

&
A type of block to build.

Ext—Make the tower multicoloured

Tip:

for column in range(0,10):
for row in range(0,10):
Build(row,column,10,WOOL)

Change where the blocks appear.

Change the colour of the blocks.

Ext—Build a Rainbow (hard!)
Task 7 gets you building out
of different materials

Task 8 gets minecraft talking to
python & python talking back

Step1/ Read the code.

Step1/ Read the code but wait!

Step2/ Try to explain to the
person next to you what the
code does.

Step2/ Do you understand what
the first two lines are doing?

Step3/ What is “red” doing?
Change this variable name as
you type the code in.

Step4/ What is countUp
doing?

Type them up without looking at
the sheet.
Step3/ Why does the code say y-1
How could we change it to find
out which block is in front of us?

Change this var to countAlong

Step4/ What does the + do in line
5?
Change it to comma.

Step5/

What does the str do?

Change the Torch to a Train.
Try to add wheels, windows…

Try it without str.
Step5/ Make sure you try the EXT

More Related Content

PPTX
Ruby Loves Dot Net
PDF
Cleaners of Caribbean
PDF
Cleaners of Caribbean
PDF
Get Multicore Differentiation and Great Integrated Graphics Performance
PDF
Cracking for beginners - copy (2)
PDF
Python教程 / Python tutorial
PPT
For Beginers - ADO.Net
PPT
Hvac presentation for beginers
Ruby Loves Dot Net
Cleaners of Caribbean
Cleaners of Caribbean
Get Multicore Differentiation and Great Integrated Graphics Performance
Cracking for beginners - copy (2)
Python教程 / Python tutorial
For Beginers - ADO.Net
Hvac presentation for beginers

Similar to Learning Python through Minecraft on the Raspberry Pi - Worksheets (20)

PDF
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
PPTX
Mastering Python lesson 3a
PDF
Introduction to python
PPTX
Python Course Basic
PPTX
Hack Rio/OS
ODP
DOCX
Coding in Disaster Relief - Worksheet (Advanced)
PDF
Bugs from Outer Space | while42 SF #6
PDF
ElixirConf 2017 - Writing an Editor in Elixir - Ian Duggan
PDF
Killer Bugs From Outer Space
PPTX
Smart DoorBell - Make your door smart with Raspberry Pi!
PDF
Python and Pytorch tutorial and walkthrough
PPTX
ForLoops.pptx
PDF
Archeology for Entertainment, or Checking Microsoft Word 1.1a with PVS-Studio
PDF
writing self-modifying code and utilizing advanced assembly techniques
PPT
week1.ppt
PDF
Rubykin
PDF
Multithread Your Application
PPTX
Exploring the Internet of Things Using Ruby
PPTX
Reversing Google Protobuf protocol
Uccn1003 -may10_-_lab_04_-_intro_to_layer-1_network_devices-updated_30_june2...
Mastering Python lesson 3a
Introduction to python
Python Course Basic
Hack Rio/OS
Coding in Disaster Relief - Worksheet (Advanced)
Bugs from Outer Space | while42 SF #6
ElixirConf 2017 - Writing an Editor in Elixir - Ian Duggan
Killer Bugs From Outer Space
Smart DoorBell - Make your door smart with Raspberry Pi!
Python and Pytorch tutorial and walkthrough
ForLoops.pptx
Archeology for Entertainment, or Checking Microsoft Word 1.1a with PVS-Studio
writing self-modifying code and utilizing advanced assembly techniques
week1.ppt
Rubykin
Multithread Your Application
Exploring the Internet of Things Using Ruby
Reversing Google Protobuf protocol
Ad

More from ManchesterBudo (8)

PPTX
MCPI at Edge Hill
PPTX
Slideshare
ODS
AKS Computing Schemes of Work 201314
ODP
Alevel Boolean Logic Questions
PPTX
Boolean addition part2a
ODP
Minecraft stepbystep
PPTX
Blender games so wb
PPTX
Blender with blooms v2
MCPI at Edge Hill
Slideshare
AKS Computing Schemes of Work 201314
Alevel Boolean Logic Questions
Boolean addition part2a
Minecraft stepbystep
Blender games so wb
Blender with blooms v2
Ad

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Complications of Minimal Access Surgery at WLH
PPTX
master seminar digital applications in india
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Basic Mud Logging Guide for educational purpose
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Computing-Curriculum for Schools in Ghana
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
01-Introduction-to-Information-Management.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
GDM (1) (1).pptx small presentation for students
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Insiders guide to clinical Medicine.pdf
RMMM.pdf make it easy to upload and study
Complications of Minimal Access Surgery at WLH
master seminar digital applications in india
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPH.pptx obstetrics and gynecology in nursing
STATICS OF THE RIGID BODIES Hibbelers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Basic Mud Logging Guide for educational purpose
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Anesthesia in Laparoscopic Surgery in India
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Computing-Curriculum for Schools in Ghana
Abdominal Access Techniques with Prof. Dr. R K Mishra
01-Introduction-to-Information-Management.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

Learning Python through Minecraft on the Raspberry Pi - Worksheets

  • 1. Task 1 is testing your file handling & typing skills on RaspPi. Step1/ open IDLE. Task 2 is about Looping, Sleeping & Moving the player with Python. Step1/ Create a new python script Step2/ Try to copy the code without making any mistakes. Step2/ Save it in Step3/ Save it in /home/pi/mcpi/api/python/mcpi or change your old one! /home/pi/mcpi/api/python/mcpi as task1.py Step4/ Go to /home/pi/mcpi/ as task2.py Step3/ Type in the code so that the script repeatedly - Waits for a bit. & start MC Step5/ Build a house like normal Step6/ When you are ready for a challenge—run the game (F5) THEN Teleports You! Step4/ Press F5 & return to MC to play with it.
  • 2. Task 3 is practising your looping & introducing 3D cords, vars & if. Task 4 is about using the minecraft chat window to show python vars. Step1/ copy the code. Step1/ copy the code. Step2/ Test the script by digging. Step2/ Test the script by moving around on minecraft. Step3/ How deep do u have 2 dig? Change it. Step4/ How high RU teleported? Change it. Step5/ Try to create a Wormhole. Step6/ Attempt the extension task. Tip: change xyz.y to xyz.x Find the xyz of your minecraft home. Step3/ What are all the numbers? (Ext—Can you “format” them?) Step4/ remember the if statement? if xyz.y>some_number: Step5/ Use the postToChat method to send a funny message. Tip: If height is greater than 50 then say “Ha ha”
  • 3. Task 5 builds things next to where the player is currently standing Task 6 introduces us to “for” loops. Step1/ copy the code. Step1/ copy the code. Step2/ it may be easier to understand the code if you press enter after each comma. Step2/ Make the Tower taller then shorter. Step3/ setBlock needs 2 things- Step3/ Use a “nested” for loop to build a wall. An xyz position to build at & A type of block to build. Ext—Make the tower multicoloured Tip: for column in range(0,10): for row in range(0,10): Build(row,column,10,WOOL) Change where the blocks appear. Change the colour of the blocks. Ext—Build a Rainbow (hard!)
  • 4. Task 7 gets you building out of different materials Task 8 gets minecraft talking to python & python talking back Step1/ Read the code. Step1/ Read the code but wait! Step2/ Try to explain to the person next to you what the code does. Step2/ Do you understand what the first two lines are doing? Step3/ What is “red” doing? Change this variable name as you type the code in. Step4/ What is countUp doing? Type them up without looking at the sheet. Step3/ Why does the code say y-1 How could we change it to find out which block is in front of us? Change this var to countAlong Step4/ What does the + do in line 5? Change it to comma. Step5/ What does the str do? Change the Torch to a Train. Try to add wheels, windows… Try it without str. Step5/ Make sure you try the EXT