wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Basic Python Quiz for Beginners

Total questions: 20

Worksheet time: 32mins

Name
Class
Date
1.

Is Python a high level programming language ?

a)

TRUE

b)

FALSE

2.

Who is the creator of Python programming language ?

a)

Dennis Ritchie

b)

James Gosling

c)

Guido van Rossum

d)

Ross Ihaka

3.

What is anaconda in context of python programming ?

a)

Free and open-source distribution of Java

b)

Free and open-source distribution of the Python

c)

Free and open-source distribution of C

d)

Free and open-source distribution of html

4.

What is Jupyter notebook ?

a)

Jupyter Notebook is a book about Jupiter Planet.

b)

Jupyter Notebook is an application to play games.

c)

Jupyter Notebook is a web application that you can use to write python code

d)

None of the above

5.

What is Visual Studio Code ?

a)

Visual Studio Code is a free source-code editor to write code.

b)

Visual Studio Code is a paid source-code editor to write code.

c)

Visual Studio Code is a programming language.

d)

There is no visual studio code.

6.

Complete the program to find greater of two numbers ?

a)
b)
c)
d)
7.

Which program will generate a table of 3?

a)
b)
c)
d)
8.

Which Program will generate odd numbers ?

a)
b)
c)
d)
9.

What is the data type of ["Sunday","Monday","Tuesday"]

a)

List

b)

String

c)

Numeric

d)

Tuple

10.

What is the data type of {"India","UAE","USA"} ?

a)

Tuple

b)

List

c)

String

d)

Numeric

11.

What will be the answer of print(5+10) ?

a)

510

b)

15

c)

51

d)

50

12.

What will be the answer of print("50" + "50")

a)

100

b)

5050

c)

505

d)

2500

13.

What is the purpose of continue statement ?

a)

To skip the loop

b)

To break the loop

14.

What is the purpose of break ?

a)

Skip the loop

b)

Break the loop

15.

What is the output of :

fruits = ["apple", "banana", "cherry"]

for x in fruits:

print(x)

if x == "banana":

break

a)

apple

cherry

b)

banana

cherry

c)

apple

banana

d)

apple

16.

What is the output of :

fruits = ["apple", "banana", "cherry"]

for x in fruits:

if x == "apple":

continue

print(x)

a)

apple

banana

b)

banana

cherry

c)

apple

cherry

d)

banana

17.

What is a correct syntax to output "Hello World" in Python?

a)

echo "Hello World"

b)

echo("Hello World")

c)

p("Hello World")

d)

print("hello World")

18.

How to you insert comment in Python ?

a)

Using "#"

b)

Using "//"

c)

Using "--"

d)

Using "\\"

19.

What is the correct file extension for Python files?

a)

.pyth

b)

.pyt

c)

.py

d)

.pt

20.

What is the output of print(100/0 ) ?

a)

100

b)

0

c)

1

d)

Division Error