How can I get the variable to subtract the input please?
Ed Taylor
edtaylor63 at gmail.com
Mon Nov 18 18:56:33 EST 2013
This will be very simple to most of you I guess but it's killing me!
print ("Please type in your age")
age = input ()
leave = 16
print ("You have" + leave - age + "years left at school")
I want to have an input where the users age is inserted and then subtracted from the variable age which is set to 16 and the answer displayed as You have x years left at school.
Help much appreciated.
Thank you
More information about the Python-list
mailing list