C.W.K.
Stream
Quiz · 3 questions

🔀 Flow — Branching, Looping, Functions

if / loops / functions / closures / walrus

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01What's the difference between case ACTIVE: and case Status.ACTIVE: in a match statement?
Hint
What does Python do with a bare name in a case pattern?
02In def f(x=[]): x.append(1); return x, what does f() return on the third call?
Hint
When is a default expression evaluated — at definition or at each call?
03What does the else clause do on a for loop?
Hint
Think about what break does to the else clause.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.