Program Function and Purpose
AP Computer Science Principles · Flashcards
AP COMPUTER SCIENCE PRINCIPLES · FLASHCARDS
Card 1
of 38
0 got it
0 to review
Current
Got it
Still learning
Not seen
QUESTION
Find and correct: def square(x): return x**; print(square(4))
QUESTION
Identify the output: f = lambda x: x + 1; print(f(5))
QUESTION
Identify the error: def divide(a, b): return a/b; divide(5,0)
Tap to flip before you grade
ANSWER
Division by zero error. Cannot divide by zero in mathematics.
Swipe → got it · swipe ← still learning
Got it
Still learning
Flip Card
Previous card
Next card