wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Basic Python Quiz 3

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What is Python primarily used for?

a)

Solving puzzles

b)

Building cars

c)

Creating websites

d)

Cooking recipes

2.

Which of the following is a feature of Python?

a)

Specialized for specific problems

b)

Machine & platform-independent

c)

Requires a license to use

d)

Difficult to learn

3.

How do you display output in Python?

a)

Using the show() function

b)

Using the display() function

c)

Using the print() function

d)

Using the output() function

4.

What is an identifier in Python?

a)

A type of snake

b)

A named memory location that stores data

c)

A type of data structure

d)

A reserved word

5.

Which of the following data types is not supported in Python?

a)

List

b)

Array

c)

String

d)

Numbers

6.

When a new value is stored in a variable, its previous value gets _ _ _ _ _ _

a)

Accepted

b)

Overwritten

c)

Overlapped

d)

Ignored

7.

The data type for 12.4 should be _ _ _ _ _ _

a)

int

b)

decimal

c)

float

d)

str

8.

What are the features of Python?

a)

Simple & easy to learn

b)

Machine & platform-dependent

c)

Requires a license to use

d)

Difficult & hard to learn

9.

Which of the following are Python Keywords.

a)

car, bike, bus, train

b)

apple, banana, orange, mango

c)

dog, cat, bird, fish

d)

for, while, if, else

10.

What are the data types used in Python?

a)

Integers, Floats, Strings

b)

Apples, Bananas, Oranges

c)

Numbers, Letters, Symbols

d)

Dogs, Cats, Birds

11.

What is the output of the following Python code?

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

a)

8

b)

15

c)

53

d)

35

12.

Which of the following is a valid variable name in Python?

a)

my_variable

b)

2nd_variable

c)

variable-name

d)

variable name

13.

What is the result of the following Python expression?

5 / 2

a)

2.5

b)

2

c)

2.0

d)

2.2

14.

Which of the following is a valid way to comment a single line in Python?

a)

// This is a comment

b)

/* This is a comment */

c)

# This is a comment

d)

%% This is a comment