Login and get codingThis Bite is to illustrate scoping. You will sum numbers while keeping track of number of hundreds in a

globalvariable called`num_hundreds`

.To illustrate this see this REPL output:

>>> from scoping import sum_numbers, num_hundreds >>> num_hundreds -1 >>> sum_numbers([10, 20, 70]) 100 >>> from scoping import num_hundreds >>> num_hundreds 0 >>> sum_numbers([10, 120, 180]) 310 >>> from scoping import num_hundreds >>> num_hundreds 3We planned to also illustrate

`nonlocal`

, but we will do that in a separate Bite ... Good luck and keep calm and code in Python!

Metrics »

215 out of 222 users completed this Bite.

Will you be Pythonista #216 to crack this Bite?

Resolution time: ~22 min. (avg. submissions of 5-240 min.)

Pythonistas rate this Bite 3.25 on a 1-10 difficulty scale.

» You can do it! 😌

Ask for Help