You are on page 1of 1

PITTS MODERN

SCHOOL,GOMIA
rishabhraj14373@gmail.com
Switch accounts

Draft saved

Multiple Choice Questions

Q:Which of the following is not a 1 point

Python legal string operation?

'abc' + 'abc'

'abc' * 3

'abc' + .3

'abc.lower()

Clear selection

1 point

[13579]

13579

1,3,5,7,9

(1,3,5,7,9)

Q: Which of the following is 1 point

False?

String is immutable.

capitalize() function in string is used


to return a string by converting the
whole given string into uppercase.

lower() function in string is used to


return a string by converting the whole
given string into lowercase.

None of these.

Clear selection

Q: Which of the following 1 point

functions will return the !rst


three characters of a string s ?

(a) s[3 : ]

(b) s[ : 3]

(c) s[-3 :]

(d) s[: -3]

Clear selection

Q: What is the output of the 1 point

following code ?

a) False True

(b) False False

(c) True False

(d) True True

Clear selection

Q:What will the output? 1 point

A. 13

B. 14

C. 15

D. 16

Clear selection

Q: Which of the following will 1 point

result in an error?str1="python"

print(str1[2])

str1[1]="x"

print(str1[0:9])

Both (b) and (c)

Clear selection

Q:Given a list L= [10, 20, 30, 40, 1 point

50, 60, 70], what would L[2 : -2]


return?

[10, 20, 30, 40]

[20, 30, 40, 50]

[20, 30, 40]

[30, 40, 50]

Clear selection

Which of the following can add a 1 point

list of elements to a list?

add( )

append( )

extend( )

none of these

Clear selection

Q:Find the Correct Output. 1 point

Q:Find Correct Output. 1 point

Clear selection

Q: What is the output when the 1 point

following code is executed ?

['Welcome', 'to', 'Python']

["Welcome to Pyhton]

["Welcome" "to" "Python"]

None of above

Clear selection

Q:Select the correct output of 1 point

the following String operations.

(a) Wah Bhyi Wah

(b) Wah Bhyi aha

(c) WahBhyiWah

(d) WahBhyiWaha

Clear selection

Q: If L = [1, 2] then L * 2 will yield 1 point

[1, 2] * 2

[1, 2, 2]

[1, 1, 2, 2]

[1, 2, 1, 2]

Clear selection

1 point

70251

15

Error

Clear selection

.Q:Which of the following will 1 point

give "Simon" as output?if


str1="John, Simon, Aryan"

print(str1[-7:-12])

print(str1[-11:-7])

print(str1[-11:-6])

D. print(str1[-7:-11])

Clear selection

Q:What is the output of the 1 point

following?

['h', 'e', 'l', 'l', 'o']

'hello'

['hello']

hello

Clear selection

Q: What will be the output of 1 point

below Python code?

A. format

B. formatio

C. orma

D. ormat

Clear selection

Q: What will the below Python 1 point

code will return? If

It returns the [rst index position of the


[rst occurance of "save" in the given
string str1.

It returns the last index position of the


last occurance of "save" in the given
string str1.

It returns the last index position of the


[rst occurance of "save" in the given
string str1.

D. It returns the [rst index position of


the [rst occurance of "save" in the
given string str1.

Clear selection

Q:Find the Correct output. 1 point

Clear selection

Page 3 of 3

Back Submit Clear form

Never submit passwords through Google Forms.

This content is neither created nor endorsed by Google.


Report Abuse - Terms of Service - Privacy Policy

Forms

You might also like