Python Strings Quiz

Python Strings Quiz

11th Grade

15 Qs

quiz-placeholder

Similar activities

List & String - Gtrade 9 Recap - Jan 22

List & String - Gtrade 9 Recap - Jan 22

9th - 11th Grade

20 Qs

python intro

python intro

4th - 12th Grade

17 Qs

ASK F2 -KOD ARAHAN (PYTHON)

ASK F2 -KOD ARAHAN (PYTHON)

1st Grade - University

15 Qs

Variables and Data Types Knowledge Check

Variables and Data Types Knowledge Check

9th - 12th Grade

16 Qs

Python year 9

Python year 9

8th - 11th Grade

20 Qs

Mastering Python Loops and Functions

Mastering Python Loops and Functions

10th Grade - University

20 Qs

Java OOP Connections

Java OOP Connections

10th - 12th Grade

20 Qs

Python Review KS3

Python Review KS3

9th - 12th Grade

17 Qs

Python Strings Quiz

Python Strings Quiz

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Wiem Rouissi

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for storing a string in Python?

variable_name = value

variable_name : value

variable_name = 'value'

variable_name => value

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to print a string in uppercase in Python?

to_upper

upper_case

uppercase

upper

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'find' method in Python return?

Index of the first occurrence of a character

Index of the last occurrence of a character

Number of characters in the string

Length of the string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you extract the first five characters of a string in Python?

Using the split method

Using the slice method

Using the reverse method

Using the join method

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to replace a part of a string with another substring in Python?

replace

switch

modify

substitute

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'split' method in Python do?

Joins two strings together

Counts the number of characters in a string

Splits a string into a list based on a delimiter

Reverses a string

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you concatenate two strings in Python?

Using the join method

Using the merge method

Using the add method

Using the plus operator (+)

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?