WorksheetsPython 01
Total questions: 15
Worksheet time: 8mins
What is a variable?
Something to store Data
Math operator
A bug
Something that cannot be changed
What can this do?
input()
Allow code to run faster
Allow user to be able to enter something
Used to debug a code
The last line of the code
Which ARE not allowed for variables naming? (Choose 2!)
Lowercase
Uppercase
Starts with numbers
Have space in between
True or False?
Python is case sensitive
True
False
What is a data type that can only be true or false?
boolean
int
string
float
Print the word: python
print("python")
print(python)
output("python")
_python
Print the total for 5 add 5
print(5+5)
print(five + five)
print(sum(5))
print("5"+"5")
This is a comment
Hide the comment above. Which one do you use?
#
/*
<!---
<hide>
print("5"+"5")
10
55
Error
5
print(5+"5")
Error
55
10
5"5"
What is another way of writing the following code?
score = score + 1
score += 1
score.add(1)
score + 1
score + score
a != b
a is not equal b
a is equal b
a is less than b
a is nearly equal b
Which of the following symbol is used to mean "Equal to" in a comparison?
=
!=
==
>=
If you want to test more than one condition, what do you use after an if statement
elif
ifif
else if
What Python command is used to mean "all other conditions"?
if
else
for
input
