Hi Can anyone tell me where I am going wrong the end result doesn't add up?
people = int(input('Enter how many people '))numdogs = int(input('Enter how 
many dogs '))
hotdogs = 10buns = 8dogsleft = 0bunsleft = 0
# total number of hot dogs neededdogs_needed = (numdogs * people)
# how many packages of hot dogspackdogs = (dogs_needed / hotdogs)
# how many packs of buns neededpackbuns = (dogs_needed / buns)
# how many hot dogs leftdogsleft = (packdogs * 10, - dogs_needed)
# how many buns leftbunsleft = (packbuns * 8, - dogs_needed)
print('Here are the details:')
print('Total hot dogs needed: ', dogs_needed)
print('Packs of hot dogs ', packdogs)
print('Packs of buns ', packbuns)
print('Dogs left: ', dogsleft)
print('Buns left: ', bunsleft)
THIS IS THE RESULT
Enter how many people 10Enter how many dogs 2Here are the details:Total hot 
dogs needed:  20Packs of hot dogs  2.0Packs of buns  2.5Dogs left:  (2.0, 
-20)Buns left:  (2.5, -20)
Many thanks for your help.
BraveArt Multimedia 

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to