[Tutor] Question
Jacob Braig
renegadesgt at gmail.com
Tue Aug 21 07:16:35 EDT 2018
I am just starting out coding and decided on python. I am confused with
something I go shooting a lot so i wanted to make some stupid easy
calculator for ammo and slowly build the program up when I understand
python better but the code I have now keeps popping up an error and I don't
understand where i went wrong a little help please.
Here is the code like I said very simple stuff.
"""
This is a simple program for ammo calculation.
Created by Jacob
"""
AMMO = " This is how much ammo remains for .40 pistol %s. "
print "Program has started."
ammopistol = raw_input("Enter total ammo before use. ")
ammopused = raw_input("Enter total ammo used. ")
ammopleft = ammopistol - ammopused
print AMMO % (ammopistol, ammopused,) ammoleft
I am having issues with " ammopleft = ammopistol - ammopused " any idea
where I have gone wrong?
More information about the Tutor
mailing list