Question: Please Create a flow chart for the following program: # Lab 5-4 the Bottles Return Program # the main function def main(): endProgram = 'no'

Please Create a flow chart for the following program:

# Lab 5-4 the Bottles Return Program # the main function

def main(): endProgram = 'no' whileendProgram == 'no' : totalBottles = getBottles() totalPayout = calcPayout(totalBottles) printInfo(totalBottles, totalPayout) endProgram = input('Do you want to end the program? (Enter yes or no): ')

# this function will get the number of bottles returned

defgetBottles():

totalBottles = 0 todayBottles = 0 counter = 1

while counter <= 7: todayBottles = int(input('Enter number of bottles for today: ')) totalBottles = totalBottles + todayBottles counter = counter + 1 returntotalBottles

# this function will calculate the payout

defcalcPayout(totalBottles): totalPayout = 0 totalPayout = totalBottles * .10 returntotalPayout

# this function will display the information

defprintInfo(totalBottles, totalPayout): print('The total number of bottles collected is' ,totalBottles) print('The total paid out is $ ' ,totalPayout)

# call main main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!