NEW
Font size
WorksheetsIntro to Python
Total questions: 10
Worksheet time: 3mins
What is a variable?
A math operator
An element, feature, or factor that is liable to vary or change.
An if statement
A computer system that can change
What does print("hello) display?
hello
gives you an error
"hello"
"hello
True is a boolean
True
False
Neither
What does \n do?
Adds a quotation
Creates a number
Adds a new line
Adds a fullstop
What does the following code display?
a = 1
b = 2
print(a + a)
2
3
4
22
What is casting?
When you convert a variable value from one type to another.
When you assign a string
When you create a boolean
When you display an integer
What symbol would you use to add a comment to your code?
//
#
-
]]
What is the answer to?
print(10 % 4)
1
3
2
4
'my name' is a valid variable?
No
Yes
How do you ask an input from a user?
name = int("what is your name")
name = input(what is your name?)
input = name("what is your name?")
name = input("what is your name?")
