Lesson 6: Functions
Learn to define functions and use them in a Python program.
Learn to define functions and use them in a Python program.
Make a useful plan for your adventure by drawing your ideas out in a flowchart.
Learn about variables and user input, and start coding your adventure!
Review what Python is, how to use an IDE called Thonny, and how to use functions to print statements in the shell.
Learn to define conditionals and use them in a Python program.
Learn what a Code Your Own Adventure program is and how you can start planning your Python adventure.
Learn about loops in Python and try using them in your program.
Use everything you've learned to create a Turtle drawing of a flower garden.
Learn to manipulate the Turtle pen by changing its color and size, and learn how to draw shapes with the Turtle library.
Explore the concept of XY coordinates and try using them in your Turtle programs.
Get an introduction to the Turtle library. This is the library you will use to draw pictures with Python.
Get a basic understanding of an extremely important coding concept: variables.
How do you find and solve mistakes in your code? In this lesson, learn about bugs and debugging in Thonny.
Learn what Python is, how to use an IDE, and how to write your first Python program.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Learn how to create circuits that turn on and off when something moves. This sort of circuit is used in alarm systems and powers motion sensing lights.
Build your camera and start taking pictures using Scratch. Each picture is saved as a costume. Make a sprite with your face or your friends faces.
Write a simple Scratch program that you can use to see what things conduct electricity.
Learn how to create circuits that turn on and off as the light changes from light to dark. A photoresistor or light sensor is used to detect light. In bright light, the sensor acts like a button that has been pushed and allows electricity to flow. In the pitch dark the sensor is like a button at rest, no electricity flows. Unlike a button, resistance of a photoresistor decreases with increasing incident light intensity.
Write a simple Scratch program that make an active buzzer buzz. A buzzer is another kind of output. The circuit and Scratch code will look familiar, they are similar to a light circuit, another kind of output.
Ever wonder how a device like your phone knows when it is flipped over? Learn how to create circuits that turn on and off if the thing that it is attached to flips over.
Find out who has the fastest reaction time with this simple circuit and a scratch program
A button or switch is used to control the flow of electricity. A button is a type of switch that stays open (off) until it it is pressed. A keyboard is a collection of buttons. Each time you press a key the circuit is completed and a letter is typed. A light switch is an example of a switch. It stays on or off depending on which way you set it.
Extend your skills by making a 4 button game controller. Each time you press a button the program will react by moving a game character, shooting or whatever you program the button to do. Use the game controller to to play the games you've already built.
Build a circuit then write a simple Scratch program that turns a light on and off - all at the command of Scratch the cat. This entire project is done on the Raspberry Pi.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Learn what a "Choose Your Own Adventure" program is and start designing your program.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Start your story by adding characters and a background. Learn how to use your creativity to create something awesome.
Continue to improve your story by bring your sprite to life with code. Start making your sprites move and talk.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Build your camera and start taking pictures using Scratch. Each picture is saved as a costume. Make a sprite with your face or your friends faces.
Write a simple Scratch program that you can use to see what things conduct electricity.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Build your camera and start taking pictures using Scratch. Each picture is saved as a costume. Make a sprite with your face or your friends faces.
Write a simple Scratch program that make an active buzzer buzz. A buzzer is another kind of output. The circuit and Scratch code will look familiar, they are similar to a light circuit, another kind of output.
Learn how to create circuits that turn on and off when something moves. This sort of circuit is used in alarm systems and powers motion sensing lights.
Learn how to create circuits that turn on and off as the light changes from light to dark. A photoresistor or light sensor is used to detect light. In bright light, the sensor acts like a button that has been pushed and allows electricity to flow. In the pitch dark the sensor is like a button at rest, no electricity flows. Unlike a button, resistance of a photoresistor decreases with increasing incident light intensity.
Ever wonder how a device like your phone knows when it is flipped over? Learn how to create circuits that turn on and off if the thing that it is attached to flips over.
Write a simple Scratch program that make an active buzzer buzz. A buzzer is another kind of output. The circuit and Scratch code will look familiar, they are similar to a light circuit, another kind of output.
Extend your skills by making a 4 button game controller. Each time you press a button the program will react by moving a game character, shooting or whatever you program the button to do. Use the game controller to to play the games you've already built.
Find out who has the fastest reaction time with this simple circuit and a scratch program
A button or switch is used to control the flow of electricity. A button is a type of switch that stays open (off) until it it is pressed. A keyboard is a collection of buttons. Each time you press a key the circuit is completed and a letter is typed. A light switch is an example of a switch. It stays on or off depending on which way you set it.
Build a circuit then write a simple Scratch program that turns a light on and off - all at the command of Scratch the cat. This entire project is done on the Raspberry Pi.
Write a simple Scratch program that allows you to control a motor with code. A key component of any robot is the motor. When you complete this project you will understand how robot motors work.
Write a simple Scratch program that you can use to see what things conduct electricity.
Build your camera and start taking pictures using Scratch. Each picture is saved as a costume. Make a sprite with your face or your friends faces.
Learn how to create circuits that turn on and off when something moves. This sort of circuit is used in alarm systems and powers motion sensing lights.
Ever wonder how a device like your phone knows when it is flipped over? Learn how to create circuits that turn on and off if the thing that it is attached to flips over.
Learn how to create circuits that turn on and off as the light changes from light to dark. A photoresistor or light sensor is used to detect light. In bright light, the sensor acts like a button that has been pushed and allows electricity to flow. In the pitch dark the sensor is like a button at rest, no electricity flows. Unlike a button, resistance of a photoresistor decreases with increasing incident light intensity.
Write a simple Scratch program that make an active buzzer buzz. A buzzer is another kind of output. The circuit and Scratch code will look familiar, they are similar to a light circuit, another kind of output.
Mad Libs is a story game – often laugh out loud funny. In the game, you are prompted for random words, which are then included in a story. In this project, you will learn how to ask questions and store the answers as variables.
Animate your Sprites
Use Sprite costumes to animate the Sprites in your story
Find out who has the fastest reaction time with this simple circuit and a scratch program
One of the first projects you built was PONG. In the PONG game the player used the keyboard to control the paddle. Follow these steps to modify your pong game to use your own two button controller. 1) add a second button. 2) Modify your code.
Extend your skills by making a 4 button game controller. Each time you press a button the program will react by moving a game character, shooting or whatever you program the button to do. Use the game controller to to play the games you've already built.
A button or switch is used to control the flow of electricity. A button is a type of switch that stays open (off) until it it is pressed. A keyboard is a collection of buttons. Each time you press a key the circuit is completed and a letter is typed. A light switch is an example of a switch. It stays on or off depending on which way you set it.