Python String Methods Quiz

Python String Methods Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Introduction to Java Programming

Introduction to Java Programming

10th Grade

18 Qs

Test Your Python Knowledge

Test Your Python Knowledge

10th Grade

14 Qs

Analisis Data dengan Python

Analisis Data dengan Python

10th Grade

20 Qs

Quiz Jaringan Komputer

Quiz Jaringan Komputer

9th - 12th Grade

10 Qs

Mengenal Pemrograman Kecerdasan Artifisial

Mengenal Pemrograman Kecerdasan Artifisial

10th Grade

20 Qs

python basics

python basics

9th - 12th Grade

20 Qs

Kiểu dữ liệu danh sách - Bài 14 - Tin 10

Kiểu dữ liệu danh sách - Bài 14 - Tin 10

10th Grade

10 Qs

Unit 19 - First Quiz

Unit 19 - First Quiz

3rd Grade - University

20 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?