I don't understand the fourth exercise. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I don't understand the fourth exercise.

Why 4 and not 3 for "eggs"?

15th Nov 2016, 11:31 AM
Leo
Leo - avatar
3 Answers
+ 3
you can change the variable value by readjusting it. in the exercise: eggs = 3 ----> 3 is the old value of the variable eggs. eggs = 4 ----> now 4 is the new value of the variable eggs. Python work with the new value of the variable not the old one.
16th Nov 2016, 9:50 PM
Mohammed Damene
Mohammed Damene - avatar
+ 2
Oh, thanks for the information! ;-)
18th Nov 2016, 10:59 PM
Leo
Leo - avatar
+ 2
you are very welcome
19th Nov 2016, 11:01 AM
Mohammed Damene
Mohammed Damene - avatar