Python Quiz

Python Quiz

7th Grade

7 Qs

quiz-placeholder

Similar activities

Revision checkpoint 1

Revision checkpoint 1

7th Grade

10 Qs

Java Lesson 11

Java Lesson 11

5th Grade - University

10 Qs

C# and Python

C# and Python

4th Grade - University

7 Qs

Python Coding

Python Coding

6th - 8th Grade

12 Qs

Python Lesson 1

Python Lesson 1

5th Grade - University

7 Qs

review Grade 8

review Grade 8

7th - 8th Grade

10 Qs

Numeric and Text datatypes

Numeric and Text datatypes

7th Grade

10 Qs

M:B Lesson #8

M:B Lesson #8

7th Grade

8 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Other

7th Grade

Hard

Created by

Mahmood Mansoor

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in Python?

A variable in Python is a data type used to store multiple values.

A variable in Python is a keyword used to define a function.

A variable in Python is a built-in function used to perform mathematical operations.

A variable in Python is a named location in memory used to store data.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the different data types in Python?

integer, float, string, boolean, list, tuple, dictionary, and set

int, float, str, bool, list, tuple, dict, and set

number, character, boolean, array, tuple, dictionary, and set

integer, float, string, boolean, list, tuple, dictionary, and set

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in Python?

You assign a value to a variable name using the '=' operator.

You use the 'const' keyword.

You use the 'let' keyword.

You use the 'var' keyword.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of the variable 'x' in the following code: x = 5?

integer

float

boolean

string

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of the variable 'y' in the following code: y = 'Hello'?

boolean

string

integer

float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

x = 10
y = 5
print(x + y)

10

15

5

50

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of the variable 'z' in the following code: z = 3.14?

integer

float

boolean

string