I have written a program where a user get shown three types of bird food. Each bird food comes in 10kg and 50kg bags each with different prices. The prices are stored in a list:
Pellets = ['Pellets', 22.75, 100.00] Mash = ['Mash', 20.50, 90.00] Enhanced = ['Enhanced', 25.50, 125.50] Size = ['10KG', '50KG']
I have current code where a user inputs their choice of feed, what size and how many bags. It then calculates the price by how many bags:
if ((foodtype) is '1' and (bagsize) is '1'): print('$',((NumberOfBags)*Pellets))
I am needing to write a if statement for a user to input there total amount of bird feed required and it tells how many bags of 50kg required and then the left over to be calculated into 10kg bags and for it to round up to a 10kg bag if a user inputs 52kgs required.
I expect the code to end up writing how many 50kg bags I need and how many 10kg bags I will require. e.g user says they need 134kg go bird feed the program will say you need 2 50kg bags and 4 10kg bags. Once this is worked out I plan to write how much the output will cost.