Code a Function, count_Cookie_Boxes, to report on number of boxes of cookies being supplied. It will accept three parameters: a number indicating the number of boxes, a number indicating the number of cookies in each box, and a string value indicating the type of cookies (i.e. ‘Oreos’, ‘Thin Mints’, etc.) The function will return a dictionary value that captures the user input.
Create a program that using a while loop will prompt the user to enter the requested information:
What type of cookies do you have to deliver?
How many cookies in each box?
How many boxes do you have?
Do you have more cookies to deliver (Y/N)?
Each item returned from the loop is added to a separate list variable that you have defined.
Create a function, report_Cookie_result. This function will accept a parameter that is a list of dictionary objects with the cookie information the user has supplied.
When the user has finished adding their cookie information, generate a summary report by calling the report_Cookie_result, passing in the list variable of dictionary objects previously collected.
The report_Cookie_result function will interrogate and print off the following information from the list of dictionary objects:
A header at the top indicating the current date and time the report was generated.1
The date format should be in the format of full month name day, year (example: July 10, 2021)
The time format should be displayed in 24 hour time format of HH:MM (example: 18:38).
There are # different types of cookies
There are # boxes of cookies
These are the types of cookies supplied:
The total number of cookies are: #
The Report output should resemble the following:
COOKIE REPORT: July 10, 2021
GENERATED: 18:47
Cookie Type Number of Boxes Number of Cookies per box
Thin Mints 10 18
Chips Ahoy 15 100
Total number of boxes: 15
Total number of cookies: 1,680
Have a nice day!