tracks

Sign in Sign up
1/7
Get a feel for programming
Saving and using information

Welcome to computer programming! We'll be using a language called Python.

A variable is just a place to store information. Here we use one, bestNumberEver, to store a whole number so we can use it later. Then we print it out. The print statement is used to print a value to the console window.

Then we use another variable, anotherNumberILike, to store a real number and print it out.

A line that starts with a # symbol is a comment and is ignored by the computer. Using comments wisely can make your code much easier for humans to read and understand.

Instructions

Run the program by pressing the Save & Submit Code button. Notice the output in the console window and make sure you understand what the program does. Then, on line 12, save the number 22 into a variable called jerseyNumber. (You don't need to print it out, but you may if you like.) Press Save & Submit Code again to test your code.

?
Stuck? Get a hint! Hint

Use an equals sign, =, and be careful to put things on the correct sides of your equals sign.

script.py
Back to Editor

Sign in