Hello. I wrote this code but can’t figure out how to create my desired output. It should output on of the following two statements;
“Hello Harry” or “Bye Bob”
Instead however, I cant seem to properly change the “Boy” variable for the correct output.
Please advise, Thank you
boy is just a variable representing an integer value. Once declared as a global inside the function you will be able to mutate it. There is no need to return it since the global will have changed (unless X is 5).
Again, to reiterate, use lowercase variable names unless they represent a class, class Boy: or a global constant, PI = math.pi.