NEW
Font size
WorksheetsPython for Beginners
Total questions: 10
Worksheet time: 5mins
What is the word (command) used to display numbers and text on the screen?
input
output
command
What will be the output?
name = 'Python'
print (name)
'Python'
Python
python
'python'
Choose the correct syntax for Python
IF answer == "Yes":
if answer == "Yes"
if answer == "Yes":
if answer == "yes"
Why would you use a loop?
To input data
To print data
To repeat a piece of code
Mathematical operations can be performed on a string
True
False
What is the output of this expression, 3*1**3
3
9
27
1
How would you assign an integer to a variable?
new_var == 4
new_var = 4
new_var = "4"
new_var "4"
How would would you print a text string?
output "Hello!"
print ("Hello!")
print (Hello!)
output (Hello!)
Which symbol do we use if we want to add a comment to our code?
@
#
!
&
To create a variable named new_var and assign it a value of 25 divided by 5, which statement would you use?
new_var = 25 \ 5
new_var = "25 \ 5"
new_var = 25 / 5
new_var = "25 / 5"
