Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Programming - Test 1

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following character is used to give comments in Python?

a)

//

b)

#

c)

!

d)

/

2.

What will be the output?

name = 'Python'

print (type(name))

a)

char

b)

'Python'

c)

str

d)

Error

3.

What will be the output?

str1 = "SGBIT"

print (str1 [2])

a)

S

b)

G

c)

B

d)

I

4.

What will be the output?

d = 10 < 11

print (d)

a)

10

b)

11

c)

True

d)

False

5.

Identify the arithmetic operator which is used to calculate exponential.

a)

*

b)

%

c)

!

d)

**

6.

List is declared using _______.

a)

{ }

b)

[ ]

c)

( )

d)

< >

7.

What will be the output?

print (13/6)?

a)

2

b)

2.1666

c)

2.5

d)

Error

8.

What will be the output?

str1 = "Deep Learning"

print (len(str1))

a)

11

b)

12

c)

13

d)

Out of Range Error

9.

What will be the output?

a = 25

b = 4

print (a%b)

a)

1

b)

6

c)

6.2

d)

1.5

10.

Unsupervised Learning deals with ---------

a)

Labelled Data

b)

Unlabelled Data

c)

Feedbacks

d)

Mistakes

11.

Which of the following features are related to Python programming?

1. Dynamically typed

2. Python works only on Windows

3. Portable

a)

1 and 2

b)

2 and 3

c)

1 and 3

d)

All

12.

IDE stands for ---------------------------

(a)  

13.

_________ algorithm try to find the best ways to earn the greatest reward.

a)

Supervised Learning

b)

Unsupervised Learning

c)

Reinforcement

Learning

d)

Both Supervised Learning and Unsupervised Learning

14.

What will be the output ?

print (type(5 // 2))

a)

int

b)

float

c)

2

d)

2.5

15.

What will be the output ?

a1 = 15

b1 = 0

print (a1 ** b1)

a)

15

b)

150

c)

0

d)

1

16.

OpenCV stands for

a)

Open Computer Voltage

b)

Open Code Via

c)

Open Source Computer Vision

d)

Open Code Vibration

17.

Python programs written in Jupyter Notebook are saved with ------- extenstion.

a)

.python

b)

.ipynb

c)

.pynb

d)

.nb

18.

What will be the output ?

s1 = "Hi"

s2 = "Rajesh"

print (s1 + s2)

a)

Hi Rajesh

b)

Hi

Rajesh

c)

HiRajesh

d)

Error

19.

What will be the output ?

a1 = 15

b1 = 3

print (a1 % b1)

a)

5

b)

45

c)

0

d)

18

20.

What will be the output ?

a1 = 26

b1 = 62

print (a1 != b1)

a)

1

b)

0

c)

True

d)

False