+ 1
y it's not working
import sys def moon_weight(): print('Please enter your current Eearth weight') weight = float(sys.stdin.readline()) print('Now enter the amount u might increase each year') increase = float(sys.stdin.readline()) print('ThankYou, only one more thing, enter the number of years') years = int(sys.stdin.readline()) years = years + 1 for year in range(1, years) weight = weight + increase moon_weight = weight * 0.165 print ('Year %s is %s' % (year, moon_weight)) moon_weight() this code suppose to ask for input and work according to that but it doesn't, i ' m curious to know where m i wrong
5 Answers
+ 9
answer = int(input("i wanna know"))
thats userinput in python
+ 7
please show program in code playground
0
k
0
added changed code to comments in your code