Python String Methods Quiz

Python String Methods Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Entrepreneurship Skill -II (Part-II)

Entrepreneurship Skill -II (Part-II)

10th Grade

20 Qs

Analisis Data dengan Python

Analisis Data dengan Python

10th Grade

20 Qs

Программирование на Python

Программирование на Python

10th Grade

20 Qs

Understanding Data and Encoding

Understanding Data and Encoding

6th Grade - University

10 Qs

Tugas Latihan Soal Informatika 9

Tugas Latihan Soal Informatika 9

9th - 12th Grade

20 Qs

Latihan Informatika X Genap

Latihan Informatika X Genap

10th Grade

17 Qs

Perangkat Lunak dan Fungsinya

Perangkat Lunak dan Fungsinya

10th Grade

10 Qs

Test grilă - Turbo Pascal

Test grilă - Turbo Pascal

10th Grade - University

11 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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?