Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Data Types and Arithmetic Quiz

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

What is the default data type in Python?

a)

Real

b)

String

c)

Integer

d)

Number

2.

What is the Python code needed to display a word on the screen?

a)

print"hello"

b)

"hello"

c)

print("hello")

d)

print="hello"

3.

What is the Python code needed to ask a user for input?

a)

input("what is your name?")

b)

input="what is your name?"

c)

(input)=what is your name?

d)

input=what is your name?

4.

Which is the correct way to store an input as a variable in Python?

a)

answer("what is your name?")

b)

input = "answer"(what is your name?)

c)

answer = input("what is your name?")

d)

input=(what is your name?)

5.

Which character represents a comment in Python code?

a)

*

b)

#

c)

&

d)

$

6.

Choose the TWO correct data types from the list below

a)

Integer

b)

Real

c)

Fake

d)

Short

7.

Why do we need to convert data types in Python?

a)

Because Python doesn't know about data types

b)

Because Python stores data types as String by default