Search Header Logo

PYTHON PROGRAMMING STRING Q6

Authored by Darwin Vargas

Computers

University

Used 8+ times

PYTHON PROGRAMMING STRING Q6
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

A. H

B. e

C. l

D. o

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you get the length of a string s in Python?

A. s.size()

B. s.len()

C. length(s)

D. len(s)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

A. P

B. n

C. o

D. h

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method can be used to convert all characters in a string to uppercase?

A. upper()

B. uppercase()

C. toUpperCase()

D. capitalize()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

A. hello world

B. Hello World

C. HELLO WORLD

D. Hello world

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you concatenate two strings str1 and str2 in Python?

A. str1.add(str2)

B. str1 + str2

C. concat(str1, str2)

D. str1.append(str2)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

A. 1

B. 2

C. 3

D. -1

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?

Discover more resources for Computers