wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lego Spike & Python - Challenge 3 Quiz

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

What is the output of the code shown?

a)

"5.0"

b)

7.0

c)

7

d)

TypeError

2.

In the code shown, what type of data is the result?

a)

int

b)

str

c)

float

d)

bool

3.

Which of the following statements correctly declares or initializes a variable in Python?

a)

int a = 10

b)

a: int = 10

c)

var a = 10

d)

a = 10

4.

What will be the output of the code shown?

a)

3.33

b)

3

c)

4.5

d)

10.3

5.

In Python, Which is the basic data type for numbers with decimals or fractional parts?

a)

float

b)

bool

c)

str

d)

int

6.

In Python, Which is the basic data type for numbers without decimals or fractional parts?

a)

float

b)

bool

c)

str

d)

int

7.

In Python, Which is the basic data type for letters, words, sentences or paragraphs?

a)

float

b)

bool

c)

str

d)

int

8.

In Python, Which is the basic data type for logic comparisons with only 2 possible alternatives?

a)

float

b)

bool

c)

str

d)

int

9.

What will be the result of the following expression?

Tip: Remember the precedence or hierarchy of arithmetic operations.

a)

12

b)

9

c)

10

d)

11

10.

What will be the output of the code shown?

a)

JohnDoe

b)

John Doe

c)

DoeJohn

d)

Doe+John