← Quiz: Scope and Closures: all 10 questions
Quiz: Scope and Closures · Question 8 of 10
What does / mean in def area(r, /, unit="cm"):?
What does / mean in def area(r, /, unit="cm"):?
- A.r is divided by unit
- B.r is optional
- C.r must be passed by position, not as r=...
- D.unit must be passed by position
Answer & explanation
Correct answer: r must be passed by position, not as r=...
Parameters before / are positional-only.
Can you get the rest right without peeking?
Take the timed Quiz: Scope and Closures quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →