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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 4PE: 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds 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
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage