wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

String & String Functions

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

str1 = "PYnative"

print(str1[1:4], str1[:5], str1[4:], str1[0:-1], str1[:-1])

a)

PYn PYnat ive PYnativ vitanYP

b)

Yna PYnat tive PYnativ vitanYP

c)

Yna PYnat tive PYnativ PYnativ

2.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

str1 = "my isname isisis jameis isis bond";

sub = "is";

print(str1.count(sub, 4))

a)

5

b)

6

c)

7

3.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

str1 = 'Welcome'

print (str1[:6] + ' PYnative')

a)

Welcome PYnative

b)

WelcomPYnative

c)

Welcom PYnative

4.

"welcome to the beautiful world of python" என்ற சரத்தை "Welcome To The Beautiful World Of Python" என மாற்றப் பயன்படும் செயற்கூறு எது?

a)

capitalize ()

b)

title()

c)

upper()

5.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

print("John" > "Jhon")

print("Emma" < "Emm")

a)

True

False

b)

False

True

c)

True

True

d)

False

False

6.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

min('strings')

a)

s

b)

r

c)

i

d)

g

7.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

print('san' 'thosh')

a)

san thosh

b)

san

c)

santhosh

d)

thosh

8.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

print ('Shree\nSaranya')

a)

ShreeSaranya

b)

Shree Saranya

c)

shreesaranya

d)

Shree

Saranya

9.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

str='example'

print (str.center(10,'*'))

a)

*****example*****

b)

**example*

c)

*example**

d)

*example *

10.

பின்வரும் குறிமுறையின் வெளியீடு எவ்வாறு இருக்கும் ...

str1="6/4"

print("str1")

a)

1

b)

6/4

c)

1.5

d)

str1