
String Function Application in Python Quiz
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
hemlata singhal
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is the correct way to extract the first three characters from a string in Python?
str[:3]
str[0:2]
str[1:3]
str[0:3]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, which function is used to find the length of a string?
len()
length()
size()
count()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? str1 = "Hello" str2 = "World" result = str1 + str2 print(result)
HelloWorld
Hello World
HelloWorld
Hello, World
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? str1 = "Python" print(str1.upper())
python
PYTHON
PyThOn
PythOn
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to find the index of the first occurrence of a substring in a string in Python?
find()
index()
search()
locate()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? str1 = "Python Programming" print(str1[7:])
Programming
Python
Program
ming
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? str1 = "Hello, World!" print(str1.replace("Hello", "Hi"))
Hi, World!
Hello, Hi!
Hi, Hi!
Hello, World!
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
14 questions
Evaluación IV Parcial INTAE
Quiz
•
10th Grade
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
10 questions
INTERNET AND INTRANET
Quiz
•
9th - 11th Grade
10 questions
Social media influencers
Quiz
•
6th - 12th Grade
13 questions
python A
Quiz
•
10th Grade
10 questions
analisis data dan visualisasi data
Quiz
•
10th Grade
10 questions
CALL: Causative Verb
Quiz
•
10th - 11th 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
