Grade 7 Coding and Robotics - Python Variables
Memo: Python Variables Worksheet Answers
Q: What is a variable in Python?
A: A variable in Python is a container for storing data values. It allows you to label and store data for later
use.
Q: Write a Python statement to store your name in a variable called 'my_name'.
A: my_name = 'YourName'
Q: Create a variable called 'grade' and assign it the value 7.
A: grade = 7
Q: What type of value is stored in the variable: age = 13?
A: The value 13 is an integer (int).
Q: Write a Python program that stores your name and age, and prints them out.
A: my_name = 'YourName'
age = 13
print('Name:', my_name)
print('Age:', age)