
Python Strings and Lists(12 adv Comp. Sci)
Authored by Imhotep Brooks
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method would you use to convert a string to lowercase in Python?
.lower()
.toLowerCase()
lowercase()
convertToLower()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you concatenate two strings in Python?
Use the '&' operator to join strings.
Call the concat() method on the string object.
Use the '+' operator to concatenate strings.
Use the '*' operator to concatenate strings.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
numbers = [10, 20, 30, 40, 50, 60, 70, 80]
print(numbers[2:6:2])
(Hint: ([start:stop:step])
[30, 40, 50, 60]
[30, 50]
[20, 40, 60]
[10, 30, 50, 70]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you find the length of a string in Python?
Use string.length() to find the length.
Use len(your_string) to get the length of a string.
Use the size() function to get the length.
Count the characters manually in a loop.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
numbers = [1, 2, 3, 4, 5]
print(numbers[::-1])
Hint([start:stop:step])
[1, 2, 3, 4, 5]
[5, 4, 3, 2, 1]
None
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first element of a list in Python?
my_list[0]
get_first(my_list)
my_list[1]
my_list.first()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method would you use to add an element to the end of a list?
insert()
add()
push()
append()
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
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
15 questions
ONLINE Quiz - Computer Hardware Basics (COMSYS 1)
Quiz
•
12th Grade
14 questions
TCP/IP & other protocols [A Level]
Quiz
•
12th Grade
20 questions
Quiz
•
7th - 12th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
20 questions
Quiz ASJ
Quiz
•
12th 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