Aug-21-2018, 03:45 PM
(This post was last modified: Aug-21-2018, 03:45 PM by 2skywalkers.)
Ok, i got that part figured out, thanks, but im confused.. again. Apple already has 10, but when I go to add it, if I want to add 2, so it is 12, it sets it equal to 2. I also can't figure out the remove part at all.
intro = input("What would you like to do?: ") if intro == "add" or intro == "Add": where = input("Where would you like to add?: ") item = input("What would you like to add?: ") amount = int(input("How much would you like to add?: ")) inv[where][item] += amount print(item + ": " + str(amount)) elif intro == "remove" or intro == "Remove": where = input("Where would you like to remove?: ") item = input("What would you like to remove?: ") amount = int(input("How much would you like to remove?: ")) inv[where][item] = item - int(amount) print(item + ": " + str(amount))