I am not understanding the exercise of Updating Variables


Hey, I am not getting anywhere in this exercise. I do not know what I am supposed to fill in.
I would appreciate help…


Hello @tag5625478567, welcome to the forums! What it is asking you to do is to use the variables october_rainfall, etc, to update annual_rainfall. So, you have to add each variable to annual_rainfall.
What you have to do is similar to this:

vara = 1#defining a new variable
varb = 3#defining a new variable
varc= 4#defining a new variable
varc = varc + varb + vara#Adding varc and varb together, and reassigning 
#the result to varc (an already declared variable).
How to do it-don't look unless you're stuck
september_rainfall = 5.16#assigns september_rainfall
october_rainfall = 7.20#new variable assignment
november_rainfall = 5.06#new variable assignment
december_rainfall = 4.06#new variable assignment
annual_rainfall = december_rainfall + november_rainfall + october_rainfall + september_rainfall + annual_rainfall
#Adds all of the newly assigned variables to to the annual_rainfall

I hope this helps!

ya thanks, I think that makes more sense. :smile:

1 Like

oh dear, i got the number 14 line, but then i got stuck on the earlier lines. I again would appreciate help.


Hello @tag5625478567 :grinning:

Could you please post your code, people can then see what you are doing wrong, and better help you.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.