
String Methods Quiz
Authored by Monika Agrawal
Computers
11th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to convert a string to all lowercase letters?
lower()
toLower()
convert()
downcase()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `strip()` method do?
Removes all spaces from the string
Removes leading and trailing whitespace
Converts the string to uppercase
Reverses the string
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method can be used to find the index of a substring in a string?
index()
find()
locate()
position()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? text = "Hello, World!" print(text.replace("World", "Python"))
Hello, Python!
Hello, World!
Hello, World
Hello, Python
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to check if a string starts with a specified substring?
startwith()
beginswith()
startswith()
isstart()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `split()` method do?
Combines two strings
Splits a string into a list based on a delimiter
Joins a list into a string
Reverses the string
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? my_string = "Python" print(my_string[1:4])
Pyt
yth
tho
Pyth
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Информатика 8ә-сынып
Quiz
•
11th Grade
10 questions
Latency and Bandwidth
Quiz
•
10th - 11th Grade
15 questions
Internet Safety Quiz
Quiz
•
9th - 12th Grade
10 questions
Scratch (28th March)
Quiz
•
KG - University
10 questions
CHƯƠNG TRÌNH CON BT1
Quiz
•
10th - 12th Grade
10 questions
R082 Book Cover Assets planning
Quiz
•
7th - 12th Grade
10 questions
DTJSQuiz
Quiz
•
11th Grade
10 questions
ID Quiz
Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade