
Python Quiz 6 on string manipulations by RK

Quiz
•
Computers
•
11th Grade
•
Medium
Reshma Kamthe
Used 5+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
s = 'foo'
t = 'bar'
print('barf' in 2 * (s + t))
What is the output of the print() function call?
True
False
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the slice expression that gives every third character of string s, starting with the last character and proceeding backward to the first?
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output of the following code?
5<5 or 10
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following list operation
aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])
[20, 30, 40, 50]
[10, 20, 30, 40]
[30, 40, 50, 60, 70, 80]
[30, 40, 50]
[10, 20, 30, 40]
[40, 50, 60, 70, 80]
None of these
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Select all the correct options to join two lists in Python
listOne = ['a', 'b', 'c', 'd']
listTwo = ['e', 'f', 'g']
newList = listOne + listTwo
newList = extend(listOne, listTwo)
newList = listOne.extend(listTwo)
newList.extend(listOne, listTwo)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
aList = [5, 10, 15, 25]
print(aList[::-2])
[15, 10, 5]
[10, 5]
[25, 10]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list function?
sampleList = [10, 20, 30, 40, 50]
sampleList.append(60)
print(sampleList)
sampleList.append(60)
print(sampleList)
[10, 20, 30, 40, 50, 60]
[10, 20, 30, 40, 50, 60, 60]
[10, 20, 30, 40, 50, 60]
[10, 20, 30, 40, 50, 60]
both are wrong
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python Quiz (part 1)

Quiz
•
9th - 12th Grade
17 questions
Python files and exceptions

Quiz
•
11th Grade
15 questions
Python Lists

Quiz
•
10th - 12th Grade
20 questions
Python - lists,loops,basics

Quiz
•
9th - 11th Grade
20 questions
js_edu_wrap_up

Quiz
•
1st Grade - Professio...
15 questions
Gateway Level 3 Python Quiz 3

Quiz
•
9th - 12th Grade
15 questions
ONE 6th FORM Introduction to Python Basics

Quiz
•
11th Grade
20 questions
Kiểm tra kiểu dữ liệu danh sách

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade