際際滷

際際滷Share a Scribd company logo
Coding with Minecraft 4:
Variables
Lesson 3 -  Coding with Minecraft -  Variables.pptx
The importance of variables
The different kinds of variables
To code a game in Minecraft with variables
Number variable  This holds numeric data.
Examples: a persons age, a players score, the year
String variable  This holds a string of alphanumeric characters.
Examples: a persons name, a password, the day of the week
Boolean variable  This has only two possible values: true or false.
Examples: Is it daytime? Is the game over?
Position variable in MakeCode  A special kind of variable that holds three
numbers that describe a specific location in three-dimensional space.
CHICKEN STORM
CHICKEN STORM
CHALLENGE 1 - MEANINGFUL
VARIABLE NAMES
 Lets change the code so we are not using
num1
 The name num1 does not represent
anything meaningful and could be hard to
understand a big block of code.
 Instead, name your new variable
ChickenNum because the number you
store is the number of chickens.
CHALLENGE 2 - GIVING
FEEDBACK
 Lets have the chicken rain machine
speak back to you.
 Right before you the chickens start
falling the response would be 5
Chickens! Coming right up! Then 5
chickens will fall on your head!
CHALLENGE 2 - GIVING
FEEDBACK
To do this, you will need to
1. Figure out how to say things in the
chat window
2. Use the join block to put together
ChickenNum +  chickens! Coming
right up!
3. Put this new block in the right location
in your code. If you put it in the wrong
spot, the chat window will respond
many times
CHALLENGE 2 - GIVING
FEEDBACK
REVIEW
 What did your variable determine in
the game?
 Why is it good coding practice to
give variables meaningful names?
Lesson 3 -  Coding with Minecraft -  Variables.pptx
To code variables in Minecraft to:
 Count things
 Keep score
 Create a report of your games activities
ARROW
COUNTER
ARROW
COUNTER
CHALLENGE 1 - 10
ARROWS ONLINE
CHALLENGE 2 -
PROVIDING A MESSAGE
EXTENSION 1- TARGET
PRACTICE
EXTENSION 2- HOW
MANY RABBITS?
FALLS IN THE AIR
FALLS IN THE AIR - STEP 1
FALLS IN THE AIR - STEP 2
HOW DOES THE VARIABLE
WORK?
EXTENSION 1 - TRACK SWIM
DISTANCE
To use variables in Minecraft to:
 Count things
 Keep score
 Create a report of your games activities
LESSON C :
COMBINING VARIABLES
Combining variables to create
messages in the sky
Check our learning progress with a quiz
Make your own unique
situations
Combine the variables to
create chains of words
Create a variable that stands
for a word
Lesson 3 -  Coding with Minecraft -  Variables.pptx
Lesson 3 -  Coding with Minecraft -  Variables.pptx
To create your own MakeCode projects
that use variables to activate different parts of
your program
INDEPENDENT
PROJECT
For this project, create an original
MakeCode project that uses multiple
variables of at least two different types,
to keep track of information in
Minecraft.
Also, find a way to use a chat
command with a parameter.
INDEPENDENT
PROJECT
Information you might store in
variables / project ideas:
 Store the number of something you spawn
 Store text for the animal you spawned
 Store your position
 Store words to put together to make
sentences.
MINECRAFT DIARY
ENTRY
 What type of information did you choose
to keep track of?
 What problems did you encounter?
How did you solve them?
 How did you use variables in your project, and
what were their types?
 What did you name your variables and why?
 What was something new that you learned for this
project? Describe how you figured
it out.
 Include at least one screenshot of your project.
Ad

Recommended

PDF
Short film script improved
Brandon_Wood
PPTX
Different types of mobile apps
MVM Infotech Co. Ltd.
PDF
Android Session.pdf
20TUCS033DHAMODHARAK
PDF
Lecture # 2 time value of money
Bich Lien Pham
PDF
Build responsive applications with google flutter
Ahmed Abu Eldahab
PPTX
Oz_Chap 2_M3_Lesson 際際滷s_Variables.pptx
ALEJANDROLEONGOVEA
DOCX
There was a cat named Lamar.[[next]]Lamar wanted to get .docx
randymartin91030
PPT
Variables
Max Friel
PPTX
S3 environment
missstevenson01
PPTX
The Processor.pptx
missstevenson01
PPTX
How Computers Work
missstevenson01
PPTX
Lesson 2 - Coding with Minecraft - Events.pptx
missstevenson01
PPTX
Lesson 1 - Coding with Minecraft -Introduction.pptx
missstevenson01
PPTX
Lesson2 - Coding with Minecraft - Events.pptx
missstevenson01
PPTX
Ethical hacking trojans, worms and spyware
missstevenson01
PPTX
Ethical hacking anti virus
missstevenson01
PPTX
Ethical hacking introduction to ethical hacking
missstevenson01
PPTX
S1 internet safety-chattingonline
missstevenson01
PPTX
S3 wireframe diagrams
missstevenson01
PPTX
Sql
missstevenson01
PPTX
Alien database
missstevenson01
PPTX
Video Games and Copyright laws
missstevenson01
PPTX
Games Design Document
missstevenson01
PPTX
Video game proposal
missstevenson01
PPTX
Evaluation
missstevenson01
PPTX
H evaluation
missstevenson01
PPTX
H testing and debugging
missstevenson01
PPTX
H file handling
missstevenson01
PPTX
How to use search fetch method in Odoo 18
Celine George
PDF
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH

More Related Content

More from missstevenson01 (20)

PPTX
S3 environment
missstevenson01
PPTX
The Processor.pptx
missstevenson01
PPTX
How Computers Work
missstevenson01
PPTX
Lesson 2 - Coding with Minecraft - Events.pptx
missstevenson01
PPTX
Lesson 1 - Coding with Minecraft -Introduction.pptx
missstevenson01
PPTX
Lesson2 - Coding with Minecraft - Events.pptx
missstevenson01
PPTX
Ethical hacking trojans, worms and spyware
missstevenson01
PPTX
Ethical hacking anti virus
missstevenson01
PPTX
Ethical hacking introduction to ethical hacking
missstevenson01
PPTX
S1 internet safety-chattingonline
missstevenson01
PPTX
S3 wireframe diagrams
missstevenson01
PPTX
Sql
missstevenson01
PPTX
Alien database
missstevenson01
PPTX
Video Games and Copyright laws
missstevenson01
PPTX
Games Design Document
missstevenson01
PPTX
Video game proposal
missstevenson01
PPTX
Evaluation
missstevenson01
PPTX
H evaluation
missstevenson01
PPTX
H testing and debugging
missstevenson01
PPTX
H file handling
missstevenson01
S3 environment
missstevenson01
The Processor.pptx
missstevenson01
How Computers Work
missstevenson01
Lesson 2 - Coding with Minecraft - Events.pptx
missstevenson01
Lesson 1 - Coding with Minecraft -Introduction.pptx
missstevenson01
Lesson2 - Coding with Minecraft - Events.pptx
missstevenson01
Ethical hacking trojans, worms and spyware
missstevenson01
Ethical hacking anti virus
missstevenson01
Ethical hacking introduction to ethical hacking
missstevenson01
S1 internet safety-chattingonline
missstevenson01
S3 wireframe diagrams
missstevenson01
Alien database
missstevenson01
Video Games and Copyright laws
missstevenson01
Games Design Document
missstevenson01
Video game proposal
missstevenson01
Evaluation
missstevenson01
H evaluation
missstevenson01
H testing and debugging
missstevenson01
H file handling
missstevenson01

Recently uploaded (20)

PPTX
How to use search fetch method in Odoo 18
Celine George
PDF
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
PPTX
Values Education 10 Quarter 1 Module .pptx
JBPafin
PPTX
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
PPTX
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
PPTX
Photo chemistry Power Point Presentation
mprpgcwa2024
PPTX
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
PPTX
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
PPTX
How to use _name_search() method in Odoo 18
Celine George
PDF
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
PPTX
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
PPTX
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
PDF
K12 Tableau User Group virtual event June 18, 2025
dogden2
PPTX
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
PPTX
How to Customize Quotation Layouts in Odoo 18
Celine George
PDF
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
PPTX
Peer Teaching Observations During School Internship
AjayaMohanty7
PDF
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
PDF
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
How to use search fetch method in Odoo 18
Celine George
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
Values Education 10 Quarter 1 Module .pptx
JBPafin
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
Photo chemistry Power Point Presentation
mprpgcwa2024
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
How to use _name_search() method in Odoo 18
Celine George
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
K12 Tableau User Group virtual event June 18, 2025
dogden2
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
How to Customize Quotation Layouts in Odoo 18
Celine George
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
Peer Teaching Observations During School Internship
AjayaMohanty7
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
Ad

Lesson 3 - Coding with Minecraft - Variables.pptx

  • 1. Coding with Minecraft 4: Variables
  • 3. The importance of variables The different kinds of variables To code a game in Minecraft with variables
  • 4. Number variable This holds numeric data. Examples: a persons age, a players score, the year String variable This holds a string of alphanumeric characters. Examples: a persons name, a password, the day of the week Boolean variable This has only two possible values: true or false. Examples: Is it daytime? Is the game over? Position variable in MakeCode A special kind of variable that holds three numbers that describe a specific location in three-dimensional space.
  • 7. CHALLENGE 1 - MEANINGFUL VARIABLE NAMES Lets change the code so we are not using num1 The name num1 does not represent anything meaningful and could be hard to understand a big block of code. Instead, name your new variable ChickenNum because the number you store is the number of chickens.
  • 8. CHALLENGE 2 - GIVING FEEDBACK Lets have the chicken rain machine speak back to you. Right before you the chickens start falling the response would be 5 Chickens! Coming right up! Then 5 chickens will fall on your head!
  • 9. CHALLENGE 2 - GIVING FEEDBACK To do this, you will need to 1. Figure out how to say things in the chat window 2. Use the join block to put together ChickenNum + chickens! Coming right up! 3. Put this new block in the right location in your code. If you put it in the wrong spot, the chat window will respond many times
  • 10. CHALLENGE 2 - GIVING FEEDBACK
  • 11. REVIEW What did your variable determine in the game? Why is it good coding practice to give variables meaningful names?
  • 13. To code variables in Minecraft to: Count things Keep score Create a report of your games activities
  • 16. CHALLENGE 1 - 10 ARROWS ONLINE
  • 21. FALLS IN THE AIR - STEP 1
  • 22. FALLS IN THE AIR - STEP 2
  • 23. HOW DOES THE VARIABLE WORK?
  • 24. EXTENSION 1 - TRACK SWIM DISTANCE
  • 25. To use variables in Minecraft to: Count things Keep score Create a report of your games activities
  • 26. LESSON C : COMBINING VARIABLES
  • 27. Combining variables to create messages in the sky Check our learning progress with a quiz
  • 28. Make your own unique situations Combine the variables to create chains of words Create a variable that stands for a word
  • 31. To create your own MakeCode projects that use variables to activate different parts of your program
  • 32. INDEPENDENT PROJECT For this project, create an original MakeCode project that uses multiple variables of at least two different types, to keep track of information in Minecraft. Also, find a way to use a chat command with a parameter.
  • 33. INDEPENDENT PROJECT Information you might store in variables / project ideas: Store the number of something you spawn Store text for the animal you spawned Store your position Store words to put together to make sentences.
  • 34. MINECRAFT DIARY ENTRY What type of information did you choose to keep track of? What problems did you encounter? How did you solve them? How did you use variables in your project, and what were their types? What did you name your variables and why? What was something new that you learned for this project? Describe how you figured it out. Include at least one screenshot of your project.