Python String Methods Quiz

Python String Methods Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Post Test Algoritma dan Pemrograman

Post Test Algoritma dan Pemrograman

10th Grade

13 Qs

CPU Quiz

CPU Quiz

10th Grade

16 Qs

Understanding User Interfaces and Programming

Understanding User Interfaces and Programming

9th Grade - University

10 Qs

TRẮC NGHIỆM VUI PYTHON

TRẮC NGHIỆM VUI PYTHON

10th Grade

10 Qs

Python for loop/lists

Python for loop/lists

9th Grade - University

15 Qs

Quiz sobre el ornitorrinco y la programación

Quiz sobre el ornitorrinco y la programación

8th Grade - University

15 Qs

Bài 28

Bài 28

10th Grade - University

15 Qs

Python Programming Quiz

Python Programming Quiz

10th Grade

17 Qs

Python String Methods Quiz

Python String Methods Quiz

Assessment

Quiz

Information Technology (IT)

10th Grade

Hard

Used 6+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following string concatenation in Python: "Hello" + " " + "World"?

"HelloWorld"

"Hello World"

"Hello World"

"HelloWorld "

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operators is used for string concatenation in Python?

*

+

-

/

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: print("Python" + "Programming")?

Python Programming

PythonProgramming

Python+Programming

Python Programming

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you concatenate the strings "Data" and "Science" with a space in between?

"Data" + "Science"

"Data" + " " + "Science"

"Data" * "Science"

"Data" - "Science"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of slicing the string "HelloWorld" with [:5]?

"Hello"

"World"

"HelloWorld"

"oWorld"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If s = "PythonProgramming", what does s[6:12] return?

"Python"

"Program"

"Progra"

"onProg"

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: s = "abcdef"; print(s[2:5])?

"abc"

"bcd"

"cde"

"cdef"

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?