Iteration
AP Computer Science Principles · Flashcards · Application
AP COMPUTER SCIENCE PRINCIPLES · FLASHCARDS
Card 1
of 12
0 got it
0 to review
Current
Got it
Still learning
Not seen
QUESTION
What is the output of 'for i in range(4, 1, -1): print(i)'?
QUESTION
What is the output of 'for i in range(2): print('Hi')'?
QUESTION
Find the error: for i in [1,2,3]: print(i)
Tap to flip before you grade
ANSWER
No error; it prints 1, 2, 3. The syntax correctly iterates over the list.
Swipe → got it · swipe ← still learning
Got it
Still learning
Flip Card
Previous card
Next card