Alright, so on the subject of variables, I did some messing around to try to do what sparkz_alot said, and I took a couple lines out and came up with this little "test" to see if it would work...
Nevermind, both ways work. I just forgot to add the period before format.
def ask_weight(): lbs = float(input("How many pounds do you weigh? ")) return lbs ask_weight() print str(lbs)Even though I returned the value for lbs, it would not print the inputted value.
(Dec-12-2017, 12:00 AM)Korbrent Wrote:(Dec-11-2017, 11:41 PM)sparkz_alot Wrote: Your 'planet_call()' only needs one print statement, the pythonic way would be:
print("Your weight on {} would be {} pounds".format(planet, pounds))For now, forget about asking for new planets. See if you can get the 'base' working correctly. As was also pointed out, Python is case sensitive so make sure your variables are of the same case.
I do not think the format command is in this version of python.
Edit: I figured out in this version of python it would be:
print("Your weight on %s would be %d pounds."%(planet, pounds))
Nevermind, both ways work. I just forgot to add the period before format.