Coding Intro: Variables and Output - Typing Practice Lesson
Variables, data types and printing in Python and JavaScript
Building Fluency
Focus Keys:
Code
Next: capital I, right middle, left Shift
0
WPM
100%
Accuracy
0
Errors
0%
Progress
In Python, a variable stores a value: name = "Maya" and age = 15. The print function shows output: print("Hello, " + name) displays Hello, Maya. Numbers can be added, subtracted, multiplied and divided: total = 3 * 4 + 2 gives 14. Use str() to join a number to text: print("Age: " + str(age)). A comment starts with # and is ignored by the computer: # store the student's age.
Quick start
- Click the text area above.
- Type the shown text. Prioritize accuracy.
- Use Backspace to correct mistakes.
Tip: Matching Pairs
Every opening quote, bracket and parenthesis needs a closing one. Glance at the end of each line to check the pairs.