Search Header Logo

String manipulation class11

Authored by Rohit E

Computers

9th - 12th Grade

Used 3+ times

String manipulation class11
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Negative index (-1) belongs to which character of a string

first character

last character

second last character

second character

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions will return the string in all caps?

to.upper()

  1. is.upper()

upper()

all-upper()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the correct output?

  1. True False

False True

  1. False False

  1. True True

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct function to get the ASCII code of a character:

  1. char('char')

  1. All of these

  1. ascii('char')

ord('char')

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

str1 = 'Waha'

print(str1[:3] + 'Bhyi' + str1[-3:])

  1. Wah Bhyi Wah

  1. WahBhyiWah

  1. WahBhyiWaha

WahBhyiaha

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Functions capitalize() and title() return the same result.

False

True

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of this code: ‘*’ * 3

***

Error

*3

3*

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?