Guess My Number – Piper

GUESS MY NUMBER

PIPER MAKE EDUCATOR RESOURCES SERIES

STARTER EXPEDITION KIT

CODE A GAME TO GUESS A NUMBER FROM YOUR PICO

Beginner

1 hr

Ages 8+

You will need a Starter Kit to do this mission. Get yours here:

CHECK OUT THE BUILD:

LEARNING OBJECTIVES

  • Use loops, variables, and conditionals to create a game that will let you guess which number your Pico has generated.
  • Understand how to use comparisons in code to determine whether a value is greater than, less than, or equal to another.
  • Make connections to comparisons to other machines that use comparisons and conditionals to function around you.

EDUCATOR RESOURCES

  • You can share the mission directly to your Google Classroom after logging into your Google educator account in the top right corner of Piper Make.

Check out our easy assignment template that you can use to ask students to share their work by including pictures of their final circuits and code.

Check out our Python-focused assessment that you can copy and share directly to your Google Classroom.

  • Useful vocabulary terms to use in classroom: conditionals, variables, if, if-else, loops

TROUBLESHOOTING TIPS

Are the number comparisons incorrect? Is your program saying 2 is greater than 5?

  • Make sure the directionality of your greater than (>) or lesser than (<) signs are correctly arragned.

Not sure what "pico guess" indicates?

  • "Pico Guess" is a variable which stores a randomly generated number as coded for in the first line. Every time you click START, a new number is generated and stored to the variable.

FINAL HARDWARE

This mission does not require a build. All you need is your Pico plugged into your computer!

FINAL CODE

This is the final code that is created. Download the embedded PNG and use the CREATIVE mode to import it to a new workspace:

OVERVIEW OF STEPS