Write a program to simulate the grocery store

Assignment Help Python Programming
Reference no: EM131725393

Programming Assignment

A small grocery store has one checkout. You have been asked to write a program to simulate the grocery store as it checks out customers. YOU ARE REQURED TO USE A QUEUE TO SOLVE THE PROBLEM. The queue program (qu.py) is located on the Instructor drive. Here are some guidelines:

1. A customer gets to the checkout every 1 - 5 minutes

2. The checker can process one customer every 5 - 15 minutes (depends on how many groceries customer has - 10 items or less will take 5 minutes, 11 - 20 items will take 6 - 10 minutes, more than 20 items will take 11 - 15 minutes - you will need two random numbers)

3. The program should find the average wait time for customers and the number of customers left in the queue

4. Use the random number generator to get values for when customers get to the checkout and how long the checker will take.

5. You are not required to use classes, but it might make things easier

Add another checkout. This one should be an express lane in which customers with10 or less items can use it. Modify the original program so that it now has 2 queues, one for the regular checkout and one for the express checkout. Express customers arrive at the checkout every 1-2 minutes. The express checker can process a customer every 2-5 minutes.

You will need to figure out how to determine if the customer is express or not.

The program should print out the same as above plus average wait time for express customers and number of express customers still in the queue.

Attachment:- Code.rar

Reference no: EM131725393

Questions Cloud

Completed course in supply chain management : Mr. Busfieldis, a distribution center manager for Hogan Kitchenwares, recently completed a course in supply chain management
A fiduciary has the special responsibility : Which basic principles of Utilitarianism defines it as a teleological ethical theory? A fiduciary has the special responsibility to _________.
How social media can be used to promote a companys services : Create a 1-page outline of your speaking points on this topic. How social media can be used to promote a company's services?
About organizing to implement cost leadership strategies : One way of thinking about organizing to implement cost leadership strategies is that firms that pursue this strategy should be highly centralized,
Write a program to simulate the grocery store : You have been asked to write a program to simulate the grocery store as it checks out customers. YOU ARE REQURED TO USE A QUEUE TO SOLVE THE PROBLEM.
Firms engage in an activity called forward pricing : Firms engage in an activity called “forward pricing” when they establish, What risks, if any, do firms engaging in forward pricing face?
Role of government in a free market society : Discuss and justify the role of government in a free market society such as the US:
Ability to be efficient or ability to adapt to environment : Which is more important for an organization: the ability to be efficient or the ability to adapt to its environment?
Write a personal policy to address it related ethical issue : Write an Organizational or Personal Policy to address the IT-related ethical issue of Paper. Indicate appropriate APA source citations for all sources you use.

Reviews

Write a Review

Python Programming Questions & Answers

  How do you call the main function in python

How do you call the main function? in Python

  Identify the top three comments made in given survey

Identify the top three comments made in survey years 2015 and 2016. Report the top three most common comments based on their relative frequency.

  Given the strings s1 and s2 that are of the same length

Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by the first character of s2, followed by the second character of s1, followed by the second character of s2, and so on (in ..

  What is complexity in asymptotic notation of your solution

Write a program in Python to draw the following figure: What is the complexity in asymptotic notation of your solution? Return the "centered" average of an array of ints, which we'll say is the mean average of the values.

  Asign true to the variable has_dups

Asign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

  Write an expression whose value is the concatenation

Write an expression whose value is the concatenation of the three str values associated with name1, name2, and name3, separated by commas. So if name1, name2, and name3, were (respectively) "Neville", "Dean", and "Seamus", your expression's value wou..

  Write python program isosceles tri equilateral tri rectangle

Write python program Isosceles Tri Equilateral Tri Rectangle, Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and perimeters.

  Implement a battleship game in python

Assignment Summary: Battleship is a children's game where players guess (x,y) coordinate positions of the opposing player's ship pieces in a 10x10 grid. For the official Hasbro rules and additional game context, read http://www.hasbro.com/common/i..

  Find the output of the given script in python

Find the output of the following script in Python. Note: All statements are valid. Rewrite the following for loop Python statements using while loop.

  How many of each package should be made to minimize cost

Each Bronze package has 1 pen, each Silver package has 5 pens, and each Gold package has 2 pens. How many of each package should be made to minimize their cost? What is the minimum cost?

  Let ll be a list of integers

Let LL be a list of integers. Use list comprehension to produce teh following lists. Each one should just take onel line. Anser questions as two comments.

  The function should return the day name (''su'',''mo''..etc)

Write the function day(d,m) where m is an integer from 1 through 12 expressing a month, and d is an integer from 1 through 31 expressing the day part of a date in 2014.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd