In Python Assume hot dogs come in packages of 10, and hot dog buns in packages of 8. # Write a program that calculates the number of packages of hot dogs and the # number of packages of hot dog buns needed for the cookout, with the minimum # amount of leftovers. The program should ask the user for the number of people # attending the cookout and the number of hot dogs each person will be given. # The program should display the following details: # The minimum number of packages of hot dog buns required # The number of hot dog buns that will be left over # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Note: You must use num_people and hd_per_person input variables and # min_hd_pckg, min_buns_pckg, hd_left, and buns_left for the output variables. # You are free to use additional variables as needed. The input and output # must have appropriate labels such as "Enter number of people attending # the cookout: " or "Minimum number of packages of hot dogs required is ". # Hint: Review the integer division // and reminder % operator. # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Test: Your input and output should look like this (three separate executions): # Enter number of people attending the cookout: 123 # Enter number of hot dogs per person: 2 # Minimum number of packages of hot dogs required is 25 # Minimum number of packages of hot dog buns required is 31 # Number of hot dogs that will be left over is 4 # Number of hot dog buns that will be left over is 2 # # Enter number of people attending the cookout: 125 # Enter number of hot dogs per person: 2 # Minimum number of packages of hot dogs required is 25 # Minimum number of packages of hot dog buns required is 32 # Number of hot dogs that will be left over is 0 # Number of hot dog buns that will be left over is 6 # # Enter number of people attending the cookout: 120 # Enter number of hot dogs per person: 3 # Minimum number of packages of hot dogs required is 36 # Minimum number of packages of hot dog buns required is 45 # Number of hot dogs that will be left over is 0 # Number of hot dog buns that will be left over is 0 # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Get the number of people attending the cookout # Get the number of hot dogs per person # Calculate the total number of hot dogs needed # Calculate the minimum number of packages of hot dogs required # Calculate the minimum number of packages of hot dog buns required # Calculate the number of hot dogs that will be left over # Calculate the number of hot dog buns that will be left over # Display the results # Minimum number of packages of hot dogs required is # Minimum number of packages of hot dog buns required is # Number of hot dogs that will be left over is # Number of hot dog buns that will be left over is

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 14E: In Chapter 4, you created a program that generates a random number, allows a user to guess it, and...
icon
Related questions
Question

In Python

Assume hot dogs come in packages of 10, and hot dog buns in packages of 8. # Write a program that calculates the number of packages of hot dogs and the # number of packages of hot dog buns needed for the cookout, with the minimum # amount of leftovers. The program should ask the user for the number of people # attending the cookout and the number of hot dogs each person will be given. # The program should display the following details: # The minimum number of packages of hot dog buns required # The number of hot dog buns that will be left over # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Note: You must use num_people and hd_per_person input variables and # min_hd_pckg, min_buns_pckg, hd_left, and buns_left for the output variables. # You are free to use additional variables as needed. The input and output # must have appropriate labels such as "Enter number of people attending # the cookout: " or "Minimum number of packages of hot dogs required is ". # Hint: Review the integer division // and reminder % operator. # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Test: Your input and output should look like this (three separate executions): # Enter number of people attending the cookout: 123 # Enter number of hot dogs per person: 2 # Minimum number of packages of hot dogs required is 25 # Minimum number of packages of hot dog buns required is 31 # Number of hot dogs that will be left over is 4 # Number of hot dog buns that will be left over is 2 # # Enter number of people attending the cookout: 125 # Enter number of hot dogs per person: 2 # Minimum number of packages of hot dogs required is 25 # Minimum number of packages of hot dog buns required is 32 # Number of hot dogs that will be left over is 0 # Number of hot dog buns that will be left over is 6 # # Enter number of people attending the cookout: 120 # Enter number of hot dogs per person: 3 # Minimum number of packages of hot dogs required is 36 # Minimum number of packages of hot dog buns required is 45 # Number of hot dogs that will be left over is 0 # Number of hot dog buns that will be left over is 0 # ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * # Get the number of people attending the cookout # Get the number of hot dogs per person # Calculate the total number of hot dogs needed # Calculate the minimum number of packages of hot dogs required # Calculate the minimum number of packages of hot dog buns required # Calculate the number of hot dogs that will be left over # Calculate the number of hot dog buns that will be left over # Display the results # Minimum number of packages of hot dogs required is # Minimum number of packages of hot dog buns required is # Number of hot dogs that will be left over is # Number of hot dog buns that will be left over is

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT