Python String Methods Quiz

Python String Methods Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Programming Bach

Programming Bach

9th - 12th Grade

14 Qs

prgramming

prgramming

6th Grade - University

11 Qs

Bài 25

Bài 25

10th Grade - University

15 Qs

Informatika Analisis Data Bab 6

Informatika Analisis Data Bab 6

10th Grade - University

20 Qs

Câu lệnh rẽ nhánh

Câu lệnh rẽ nhánh

10th Grade

10 Qs

BAB 6 - KELAS 10 INFORMATIKA Analisis Data

BAB 6 - KELAS 10 INFORMATIKA Analisis Data

10th Grade

15 Qs

Simulasi Pra  Ujian SMT 1 Py

Simulasi Pra Ujian SMT 1 Py

10th Grade

20 Qs

Quiz Pemrograman Arduino

Quiz Pemrograman Arduino

10th Grade - University

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