Variables & Data Types Py Reading

Variables & Data Types Py Reading

Assessment

Passage

Computers

9th - 10th Grade

Easy

Created by

Andrew Ward

Used 2+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in Python?

A container to store data

A function to execute code

A module to import libraries

A syntax error in code

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a string in Python?

15

36.5

"John"

True

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? a = 5; b = 10; sum = a + b; print(sum)

5

10

15

20

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type in Python represents whole numbers without decimals?

Integer (int)

Floating-point Number (float)

String (str)

Boolean (bool)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of the variable 'score' after executing the following code? score = 10; score = score + 5;

5

10

15

20

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a list in Python?

"apple"

["apple", "banana", "cherry"]

True

36.5