WorksheetsCodeHS Python Variables
Total questions: 8
Worksheet time: 4mins
What is a variable?
A number
A message input by the user
A location in memory that we use to store data
A printout that show answer that user entered.
What symbol is used in python to assign values to a variable?
:
*
=
==
What rule is the following variable name BREAKING:
1st_Name
No special characters other than underscore
Only use text for the start of the variable name - no numbers at start
Keep names meaningful
There is nothing wrong with this variable name
What rule is the following variable name BREAKING?
StudentNo.
Only use text for the starting letter of a variable name - not numbers at the start
No special symbols other than the underscore
There is nothing wrong with this variable name
Keep variable names meaningful for the task they are being used for
What is the variable name in the following script?
name
hello, your name is
There is no variable in this script
Which name would be meaningful in keeping a record of someone's high score?
s
hs
score
highScore
Looking at the following code, what are the names of the variables:
TotalBill, No_Diners, Share
Total_Bill, No_Diners, Share
print, format, input
float, int, input
