I needs help once again trying to figure out how to make my program run. I got as far as I could on my own. I already have debugged the Python program more than a few times and now I am stumped. I will attach my python code if I can get some input on possibly figuring out why it wont run properly. # The Main Function def main(): endProgram = "no" while endProgram == "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 def getBottles(): totalBottles = 0 todayBottles = 0 counter = 1 while (counter <=7): todayBottles = input("Enter Number of Bottles for Today:") (totalBottles) = int(totalBottles) + int(todayBottles) counter = counter + 1 return totalBottles # This Function will calcualte the payout def calcPayout(totalBottles): totalPayout = 0 totalPayout = totalBottles * 0.10 return totalPayout # This Function will display the Information def calcPayout(todayBottles,totalPayout): print ("The total number of bottles collected is {}" .format(totalBottles)) print ("The total paid out is ${:.2f}" .format(totalPayout)) #calls Main Function main()
I needs help once again trying to figure out how to make my program run. I got as far as I could on my own. I already have debugged the Python program more than a few times and now I am stumped. I will attach my python code if I can get some input on possibly figuring out why it wont run properly. # The Main Function def main(): endProgram = "no" while endProgram == "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 def getBottles(): totalBottles = 0 todayBottles = 0 counter = 1 while (counter <=7): todayBottles = input("Enter Number of Bottles for Today:") (totalBottles) = int(totalBottles) + int(todayBottles) counter = counter + 1 return totalBottles # This Function will calcualte the payout def calcPayout(totalBottles): totalPayout = 0 totalPayout = totalBottles * 0.10 return totalPayout # This Function will display the Information def calcPayout(todayBottles,totalPayout): print ("The total number of bottles collected is {}" .format(totalBottles)) print ("The total paid out is ${:.2f}" .format(totalPayout)) #calls Main Function main()
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
I needs help once again trying to figure out how to make my
# The Main Function
def main():
endProgram = "no"
while endProgram == "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
def getBottles():
totalBottles = 0
todayBottles = 0
counter = 1
while (counter <=7):
todayBottles = input("Enter Number of Bottles for Today:")
(totalBottles) = int(totalBottles) + int(todayBottles)
counter = counter + 1
return totalBottles
# This Function will calcualte the payout
def calcPayout(totalBottles):
totalPayout = 0
totalPayout = totalBottles * 0.10
return totalPayout
# This Function will display the Information
def calcPayout(todayBottles,totalPayout):
print ("The total number of bottles collected is {}" .format(totalBottles))
print ("The total paid out is ${:.2f}" .format(totalPayout))
#calls Main Function
main()
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education