Answer:
Following are the code to this question:
person= int(input("Input the value who attend the cookout: "))#defining a variable person for input value
Given_hotdog = int(input("Input the value of hotdog, that each person will take: "))#defining a variable Given_hotdog for input value
hotdogs = person* Given_hotdog #calculating the total value of hotdogs
# calculating the numbers of the package, that holds require hotdog and buns
package_hotdog=int(hotdogs/10)+1# calculating hotdog packages
bun_package=int(hotdogs/8)+1# calculating buns package
left_hotdogs= package_hotdog*10 -hotdogs# calculating left hotdogs
left_buns=bun_package*8-hotdogs# calculating left buns
print("Total Hotdogs",hotdogs)#print total hotdogs value
print("The Minimum number of packages require for hotdogs: ", package_hotdog)#print require hotdogs value
print("The Minimum number of packages require for buns: ", bun_package)#print require buns value
print("Number of left hotdogs: ", left_hotdogs)#print left hotdogs value
print("Number of left buns: ", left_buns)#print left buns value
Output:
please find the attached file.
Step-by-step explanation:
In the above-given code, the "person and Given_hotdog" variable is declared, which is used to take input from the user end and in the "hotdogs" variable we calculate its total value.
- In the next step, "package_hotdog and bun_package" is declared, which uses the "hotdogs" variable to calculate its value.
- At the last step, the "left_hotdogs and left_buns" variable is declared, which uses the above variable for calculating the value and use the print method to print its value.