
python strings
Authored by Assoc.Prof,IT Chennai
Professional Development
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the following Python code snippet do?
string = "Hello, World!"
print(string.upper())
Prints “Hello, World!” in lowercase
Converts “Hello, World!” to uppercase and prints it
Reverses the string “Hello, World!”
Removes all whitespace characters from the string “Hello, World!”
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How can you concatenate two strings in Python?
Using the concat() method
Using the join() method
Using the & operator
Using the + operator
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following Python code snippet?
string = "Hello, World!"
print(string[3:7])
“Hello”
“lo, “
“lo, W”
“lo, World”
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which method is used to split a string into a list of substrings based on a delimiter in Python?
split()
substring()
separate()
divide()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the strip() method do in Python string manipulation?
Removes all whitespace characters from both ends of the string
Removes all characters except alphabets from the string
Converts the string to uppercase
Converts the string to lowercase
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following Python code snippet?
string = "Hello, World!"
print(string.rjust(20))
” Hello, World!”
“Hello, World! “
” Hello, World! “
“Hello, World! “
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the isdigit() method do in Python string manipulation?
Checks if all characters in the string are digits
Converts the string to lowercase
Checks if all characters in the string are alphabets
Checks if the string is empty
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
Basic Clinical Chemistry
Quiz
•
Professional Development
20 questions
Unit 6: Musical Expressions
Quiz
•
Professional Development
10 questions
Bloom's Taxonomy Refresh
Quiz
•
Professional Development
20 questions
Module 6: Social Groups and Organization
Quiz
•
11th Grade - Professi...
10 questions
Code of Ethics for Teachers
Quiz
•
KG - Professional Dev...
10 questions
Pre and Post Test
Quiz
•
Professional Development
10 questions
Food Allergens (Kitchen)
Quiz
•
Professional Development
10 questions
Pre & Post Test QCC
Quiz
•
Professional Development
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