
Python Strings
Authored by Nicholas Marsh
Computers
10th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet: "Hello" + "World"?
A) HelloWorld
B) Hello World
C) "HelloWorld"
D) "Hello World"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
x = "Python", What is the result of x[0]?
A) P
B) y
C) Py
D) p
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you slice the string x = "coding" to get the output "cod"?
A) x[0:2]
B) x[0:3]
C) x[:3]
D) x[3:]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to get the last character of the string s = "data"?
A) s[-1]
B) s[3]
C) s[len(s)]
D) Both A and B
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the effect of x = "Data", x.upper()?
A) data
B) DATA
C) Data
D) dATA
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does x = "PYTHON", x.lower() return?
A) python
B) PYTHON
C) Python
D) pYTHON
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you replace all occurrences of "l" with "z" in the string "hello"? For the purposes of this question, don't worry about reassignment.
A) "hello".replace("l", "z")
B) "hello".replace("z")
C) "hello".replace("l")
D) "hello".replace("z", "l")
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
Q1 M 2 - TOPIC 2 / Check your understanding
Quiz
•
10th Grade
10 questions
Quiz Excel 3
Quiz
•
10th Grade
10 questions
J808 LO1.1 Advantages of following a project life cycle
Quiz
•
10th Grade
10 questions
IBSTEAM - Formació Directori Google Workspace 1
Quiz
•
10th Grade
10 questions
Операторы и функции языка Pascal
Quiz
•
1st - 10th Grade
12 questions
10 Клас Python tests
Quiz
•
10th Grade
10 questions
Xth IT Viva
Quiz
•
10th Grade
10 questions
TIN HỌC 10 - BÀI 21
Quiz
•
10th 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