Python String Methods Quiz

Python String Methods Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Quiz Pemrograman Arduino

Quiz Pemrograman Arduino

10th Grade - University

15 Qs

Programming Bach

Programming Bach

9th - 12th Grade

14 Qs

7.3.3 Console Input & Output

7.3.3 Console Input & Output

10th Grade

11 Qs

Asesmen Sumatif PHP

Asesmen Sumatif PHP

10th Grade - University

20 Qs

Programming Review Quiz

Programming Review Quiz

9th - 12th Grade

20 Qs

quiz1B1

quiz1B1

7th Grade - University

20 Qs

Simulasi Pra  Ujian SMT 1 Py

Simulasi Pra Ujian SMT 1 Py

10th Grade

20 Qs

Quiz tentang Google Colab

Quiz tentang Google Colab

10th Grade - University

20 Qs

Python String Methods Quiz

Python String Methods Quiz

Assessment

Quiz

Information Technology (IT)

10th Grade

Hard

Used 1+ 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?