String Data Type(Python)
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Namal (ITNamal)
Used 3+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
s = "Python"
print(s[1:4])
a) 'ytho'
b) 'Pyt'
c) 'yth'
d) 'tho'
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
s = "hello"
print(s.capitalize())
a) 'HELLO'
b) 'Hello'
c) 'hELLO'
d) 'hello'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following methods would you use to convert all characters in a string to lowercase?
a) toLowerCase()
b) lowercase()
c) lower()
d) to_lower()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
s = "Hello, World!"
print(s.split(","))
a) ['Hello', 'World!']
b) ['Hello', ' World!']
c) ['Hello, ', 'World!']
d) ['Hello', 'World']
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you concatenate two strings, 'str1' and 'str2', in Python?
a) str1.concat(str2)
b) str1 + str2
c) str1.append(str2)
d) str1 & str2
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code?
s = "Python"
print(s[-1])
a) P
b) o
c) n
d) h
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method would you use to remove whitespace from the beginning and end of a string?
a) strip()
b) trim()
c) remove()
d) delete()
Create a free account and access millions of resources
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
15 questions
History of Computers
Quiz
•
6th - 12th Grade
16 questions
Python Basics
Quiz
•
KG - University
20 questions
Python Recap
Quiz
•
7th Grade - University
15 questions
Vocabulary of Computer
Quiz
•
12th Grade
20 questions
Ôn tập học kỳ I
Quiz
•
9th - 12th Grade
15 questions
Sinh hoạt lớp Tuần 7
Quiz
•
1st Grade - University
15 questions
Sumatif 1 Dampak Sosial Informatika
Quiz
•
9th Grade - University
15 questions
Basic 2D Sketching - Fusion 360
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
10 questions
hands washing
Quiz
•
5th - 12th Grade
53 questions
US History Domain 1 Review CP 2025 (Tech Enhanced)
Quiz
•
9th - 12th Grade
