wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz 1 G7

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What will the output be from the following code?
print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

2.

What will the output be from the following code?
print("Hello world!")

a)

SyntaxError

b)

Hello world!

c)

"Hello world!"

d)

print(Hello world!)

3.

Which of the following is a ONE LINE correctly-formatted comment?

a)

&comment

b)

“”Comment””

c)

!comment

d)

#comment

4.

The correct way to write a variable in python?

a)

my_variables=10

b)

my_variable:10

c)

my variable=10

d)

my_variable is 10

5.

What does the statement 'print' do?

a)

Output a hard copy of a program to a printer

b)

Output a message on the screen

c)

Print a hard copy of a flowchart to a computer

6.

Which data type is used to store:
100

a)

Integer

b)

Boolean

c)

Double

d)

String

7.

Which data type is used to store:
TRUE

a)

String

b)

Boolean

c)

Double

d)

Integer

8.

Which data type is used to store:
"D"

a)

String

b)

Float

c)

Integer

d)

Double

9.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

name

c)

'Dave'

d)

(name)

10.

What Python command lets the user enter an answer to a question?

a)

answer()

b)

open()

c)

print()

d)

input()