wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python 3

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

str="world of python programming"

len(str)

a)

24

b)

25

c)

27

d)

28

2.

str="world of python programming"

print(str[0:5])

a)

world

b)

word

c)

wold

d)

wolrd

3.

str="world of python programming"

print(str[::-2])

a)

gimopnhy odrw

b)

gimronhy odrw

c)

gimropnhy odr

d)

gimropnhy odrw

4.

str="world of python programming"

print(str.capitalize())

a)

World of Python Programming

b)

World of python Programming

c)

World of python programming

d)

World of Python programming

5.

str="world of python programming"

str+=" store"

print(str)

a)

world of python programmingstore

b)

world of python programming store

c)

world of python programming store

d)

World of python programming store

6.

str="world of python programming"

str+=" store"

str.replace('o','O')

a)

'wOrld Of python prOgramming stOre'

b)

'wOrld Of pythOn prOgramming store'

c)

'wOrld Of pythOn prOgramming stOre'

d)

'wOrld Of pythOn programming stOre'

7.

str="world of python programming"

str.upper()

a)

'WORLD OF PYTHON PROGRAMMING STORE'

b)

'WORLD OF PyTHON PROGRAMMING STORE'

c)

'WORLD OF PYTHON PROGRaMMING STORE'

d)

'WORLD oF PYTHON PROGRAMMING STORE'

8.

ch=99

print(chr(ch))

a)

c

b)

b

c)

a

d)

d

9.

>>>str="computer"

>>> str1='science'

>>> str3=str+str1

>>> print(str3)

a)

computerscience

b)

'computerscience'

c)

"computer"'science'

d)

"computerscience"

10.

str="computer"

print(str[-6:-1])

a)

mpute

b)

ompute

c)

mputer

d)

mputr