
Python Strings and Methods Quiz
Authored by Fadi Fadi
Information Technology (IT)
9th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a string in Python?
A number
A list
An array of characters
A boolean
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Are strings mutable in Python?
Yes
No
Sometimes
Only with split()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code return? "Hello World".split()
['H', 'e', 'l', 'l', 'o']
['Hello', 'World']
['Hello World']
Syntax error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following can be used as a separator in split()?
Space
Comma
Any character
All of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of text.split(",") if text = "a,b,c"?
['abc']
['a', 'b', 'c']
['a,b,c']
['a b c']
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a CSV file?
A picture
A Python library
A text file with comma-separated values
A type of loop
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you use split() on a string with multiple spaces?
['The', '', '', 'cat']
['The', 'cat']
['The cat']
Error
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?