Search Header Logo

strings

Authored by Divya Ghalagi

Computers

11th Grade

strings
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

predict the output:

str="computer student"

print(len(str)

13

14

15

16

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the output of the following?

print('abcefd'.replace('cd','12'))

ablef2

abcefd

ablefd

abl2ed2

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

given a string str="Togetherwithpython" what is the output of str.count("t") ?

3

2

none

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the output of the following code?

exam="rachana Sagar"

print("%s" %exam[4:8])

Sagar

anas

ana

Ra

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

suppose str="\t\tBookworld\n",what is str.strip()?

\t\tBookWorld\n

\t\tBookWorld

\t\tBookWORLD\n

BookWorld

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print('together with python 11',isalnum()). predict the output

True

False

None

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print('ccdcddcd'.find('c'))

4

0

Error

True

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?