PYTHON PROGRAMMING STRING Q6

PYTHON PROGRAMMING STRING Q6

University

25 Qs

quiz-placeholder

Similar activities

Introduction to Python

Introduction to Python

KG - University

25 Qs

PYTHON FUNCTION

PYTHON FUNCTION

University

20 Qs

Examen 1P DAND 23

Examen 1P DAND 23

University

20 Qs

Quiz on Java

Quiz on Java

University

20 Qs

Lists and Tuples

Lists and Tuples

University

20 Qs

PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

Pointers

Pointers

University

20 Qs

Aptitude Competition(FY)

Aptitude Competition(FY)

University

25 Qs

PYTHON PROGRAMMING STRING Q6

PYTHON PROGRAMMING STRING Q6

Assessment

Quiz

Computers

University

Medium

Created by

Darwin Vargas

Used 8+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?