Use (idle 3.6 ) python (data structure by using python )
In each Pez plastic container of Pez candy, the colors are stored in random order. Frank’s little brother, Phil, likes only the yellow ones, so he painstakingly takes out all the candies one by one, eats the yellow ones, and keeps the others in order, so that he can return them to the container in exactly the same order as before – minus the yellow candies. Write a program to simulate this process. You are REQUIRED TO USE A STACK TO SOLVE THIS PROBLEM. Use the following colors for the candy: Red, Yellow, Blue, Orange, Purple. Figure out how to determine the color order. Display the candy colors as they come out of the Pez dispenser and as they are put back.
extra :
Use a random number generator to randomly select the candy color.
8 years ago
6
Answer(0)
other Questions(10)
- 1. The objective of a firm's management should be to only undertake the projects that ________ the market value of shareholders' equity
- Business writing
- Discussion
- For Prof. Nicholas
- Need some people to post craigslist ads if anyone can let me know if this can be done
- Business Law Discussion
- MAT 540 Week 2 Quiz
- 2 page paper
- Project management
- Payment Post