wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Intermediate Quiz - 2

Total questions: 15

Worksheet time: 3mins

Name
Class
Date
1.

Which module in python gives us the ability to open links in the browser?

a)

Webbrowser

b)

Requests

c)

Html

d)

googlesearch

2.

What are status codes?

a)

Status codes are issued by a server in response to a client's request made to the server

b)

Status codes are numbers that tell whether a piece of information has gone successfully or not

c)

Status codes are issued when servers run into a problem

d)

Status codes are codes that the internet issues incase of faults

3.

Mention the name of the loop that works only is the condition given is true

(a)   LOOP

4.

The _________ string is a string that contains sequence of bytes, which we later put it in the form of an image

a)

byte

b)

fill

c)

data

d)

picture

e)

image

5.

What are printing patterns?

a)

Patterns that can be printed by using complex algorithms

b)

Patterns which consist of ' * ' mark that prints in different shapes

c)

Patterns can be printed in python using simple for loops

d)

Patterns that will be printed using complex code which consists of loops

6.

What's the output of the code?

a)

b)

c)

7.

Which of the following do you use to get information about a webpage?

a)

requests.get()

b)

re.get()

c)

webbrowser.get()

d)

googlesearch.get()

8.

Choose the correct option:

a - 200

b - 404

a)

a - ok

b - ok

b)

a - server error

b - ok

c)

a - ok

b - page not found

d)

a - ok

b - network error

9.

Which file handling mode enables us to write byte code?

a)

w

b)

w+

c)

wb

d)

wbyte

10.

1 byte = _ bits

a)

2

b)

4

c)

5

d)

8

11.

Choose the correct one

a)

if

if

if

if

else

b)

if

elif

elif

else

c)

if

else

if

else

if

else

d)

if

elif

if

elif

else

12.

Out of the 4 keywords, which of the 2 are necessary for catching an error?

a)

try

b)

finally

c)

except

d)

else

13.

JSON

a)

JavaScript Object Notation

b)

JavaScript Oriented Notation

c)

Java scripter objects note

d)

JavaScript of Nodes

14.

which function of json module is used for reading the information from a json file in the form of a string?

a)

.load()

b)

.loads()

c)

.dump()

d)

.dumps()

15.

What would you prefer?

IDLE or VS CODE

a)

IDLE

b)

VS CODE