
CS172 Test 1 Review
Flashcard
•
Computers
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the official name of the string type in Python?
Back
str
2.
FLASHCARD QUESTION
Front
Which operator should we use to check if one variable is equal to another? Options: =, ==, !=, <=
Back
==
3.
FLASHCARD QUESTION
Front
To execute a statement n times, which loop should we use? Options: for line in f:, for item in n:, for i in range(len(n)):, for i in range(n):
Back
for i in range(n):
4.
FLASHCARD QUESTION
Front
To handle errors converting between types, what Python feature do we need to use?
Back
try/except block
5.
FLASHCARD QUESTION
Front
In Python, this is a mutable sequence of related data, usually all of the same type
Back
list
6.
FLASHCARD QUESTION
Front
Lists support this operation, but tuples do not. Options: Taking the length, Indexing, Unpacking, Appending
Back
Appending
7.
FLASHCARD QUESTION
Front
Which indices will the following slice access: myList[1:3]
Back
1,2
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?