
Understanding Strings in Python
Authored by Van Khanh
Mathematics
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
82 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid string declaration?
string = "Hello"
string = 'Hello'
string = """Hello"""
All of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you get the length of a string s?
len(s)
length(s)
s.length()
size(s)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method converts all characters of a string to uppercase?
toUpper()
upper()
to_upper()
upcase()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of "hello".capitalize()?
HELLO
hello
Hello
Hello World
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to concatenate strings in Python?
+
&
concat()
append()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does s[::-1] do?
Reverses the string s
Returns the first character of s
Returns the last character of s
Rotates the string s
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you check if a string s contains only digits?
s.isdigit()
s.isnumeric()
s.isalpha()
s.isalnum()
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
79 questions
6AB Formative Review - Algebra
Quiz
•
6th Grade - University
87 questions
Unit 5 – Trig Functions - Radian - Vocab
Quiz
•
12th Grade - University
78 questions
A2A Final Review Master S25
Quiz
•
10th Grade - University
78 questions
Test bank NHTM - CHAP 9
Quiz
•
University
87 questions
Lunger Unit 4 Lesson 1: Exponents (and Some Review)
Quiz
•
5th Grade - University
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Mathematics
7 questions
Introduction to Fractions
Interactive video
•
1st Grade - University
14 questions
Transformations of Quadratic Functions
Quiz
•
KG - University
16 questions
Say it with Symbols Review
Quiz
•
7th Grade - University
20 questions
Special Right Triangles
Quiz
•
8th Grade - University
7 questions
Learning Check: 1 step Equations
Quiz
•
9th Grade - University
17 questions
Differential Equations Review
Quiz
•
11th Grade - University