wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Demo Quiz Set1

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.

In which area/s is Python being used?

a)

Web Development

b)

Data Science

c)

Artificial Intelligence

d)

All of these

2.

Python is a scripting /interpreted language

a)

True

b)

False

3.

Predict the output of the following statement:

a = "20"

b = "30"

print(a+b)

a)

50

b)

2030

c)

Error

d)

No output

4.

Which is the statement that can be used to load a Python library into your program?

(a)  

5.

Which of the following statement will give the exact division answer?

a)

print(10/3)

b)

print(10//3)

c)

print(10%3)

d)

print(10**3)

6.

Predict the output:

result = 10%3*5//2

print(result)

a)

2.5

b)

2

c)

7.5

d)

7

7.

Predict the output:

anime = "Spiderman"

print("anime")

a)

Spiderman

b)

anime

c)

Error

d)

No outpur

8.

Syntax : Python :: Grammar : English

a)

True

b)

False

9.

Name one of the famous websites or applications, in which Python is being used.

2 lines
10.

Which is the correct usage of random module to generate a random number between 1 and 10?

a)

import random

print(random(1,10))

b)

import random

print(random(1,11))

c)

import random

print(random.randint(1,10)

d)

import random

print(random.randint(1,111)

11.

Using which library and function, we can generate emojis in Python?

a)

library = emoji

function = smiley

b)

library = emoji

function = emoji

c)

library = emojize

function = emoji

d)

library = emoji

function = emojize

12.

What does the following Python code will do?

import time

time.sleep(10)

print("Hello Champ")

a)

The program will terminate

b)

The program will wait for 10 minutes then print Hello Champ

c)

Program will print Hello Champ then waits for 10 seconds

d)

Program will wait for 10 seconds then print Hello Champ