
String Function Application in Python Quiz

Quiz
•
Computers
•
10th Grade
•
Medium
hemlata singhal
Used 1+ times
FREE Resource
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!
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
9 questions
Quiz sobre a aula passada!

Quiz
•
9th - 12th Grade
14 questions
Understanding Python Basics

Quiz
•
8th Grade - University
14 questions
String Manipulation and Validation

Quiz
•
10th Grade
10 questions
Unit 1 Post Test: Basic Python

Quiz
•
9th - 12th Grade
15 questions
Data Types and Operations

Quiz
•
10th Grade
10 questions
Pyhton

Quiz
•
9th - 10th Grade
10 questions
Lớp 10: Câu hỏi TN củng cố kiến thức

Quiz
•
10th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade