WorksheetsPython Basics Review
Total questions: 18
Worksheet time: 9mins
How would you create a program to display "Hello World!"
print(Hello World!
input("Hello World!")
print("Hello World!")
print(Hello World!)
Which python operator means 'less than or equal to'?
>=
>
<
<=
What will be the output?
name = "Dave"
print (name)
Dave
'Dave'
name
(name)
Which symbol means "not equal to"
%
==
!=
**
What is an example of a boolean?
"Hello!"
56
True/False
46.7
23 == 32
True
False
4 == 4.0
True
False
Error
What is the purpose of a loop in programming?
The purpose of a loop in programming is to repeat a block of code.
The purpose of a loop in programming is to randomly select a block of code.
The purpose of a loop in programming is to skip a block of code.
The purpose of a loop in programming is to execute code only once.
What is the output of the following code?
x = 5
y = 3
print(x + y)
8
2
15
7
What will this symbol do?
\n
Not
New line
Does nothing
