Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a python program that uses loops to take in 10 colors/flavors of pez candy from a user and add them to a virtual pez

Write a python program that uses loops to take in 10 colors/flavors of pez candy from a user and add them to a virtual pez dispenser (array). The script should print out the contents of the dispenser before taking in the input to show that the pez dispenser is empty. After the dispenser has been loaded using a loop, the contents of the dispenser should be printed out to show that it is full. The program should then dispense the candy 1 piece at a time and conclude by printing out the contents of the dispenser, showing that it is now empty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions