wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz1_7C

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the output from the following code?

print ("hello world")

a)
Hello World
b)
hello world
c)
print hello world
2.

Which of the following code is a Python Comment?

a)

#this is a comment

b)

{ this is a comment }

c)

" this is a comment "

d)

( this is a comment )

3.

Quelle est l'extension de fichier correcte pour les fichiers Python ?

a)
b)
c)

.pyth

d)

.pt

4.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
5.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
6.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

7.
What Python command lets the user enter an answer to a question?
a)
answer()
b)
open()
c)
print()
d)
input()
8.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
9.

What will the output be from the following Python code?

print(Hello world!)

a)

Hello world!

b)

SyntaxError

c)

Hello world

d)

print(Hello world!)

10.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
11.
In python the ' INTEGER data type' can be defined as...?
a)
holds alphanumeric data as text
b)
holds whole numbers
c)
holds numbers with a decimal point
d)
holds either ‘true’ or ‘false’
12.
In python the ' FLOAT data type' can be defined as...?
a)
holds alphanumerical data
b)

holds whole numbers

c)

holds a decimal point in a number

d)
hold either true or false
13.
In python the ' BOOLEAN data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a number with a decimal point
d)
holds either true or false
14.
In python the ' STRING data type' can be defined as...?
a)
holds alphanumeric text
b)
hold whole numbers
c)
holds numbers with a decimal point
d)
holds either a true or false value
15.

The statement input allows us to:

a)

input values to the code

b)

Read what the user typed

c)

order the imported statements

d)

show there name