How do I get the over budget to be $448.95 and remove the 0000005
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
How do I get the over budget to be $448.95 and remove the 0000005
![File Edit Format Run Options Window Help
2# Program Name: Lab 3
Author: Cory Morris.
Location: c:\python\
3# Date written: 9/16/2022
4# Created to fulfill requirments for CoSC 1336, Sec. 014, Fall 2022
5#------
Programe Summary: Enter number of packages purchased, get the Total Amount and Discount
#-------
# Data Dictionary
# Name: Enter number of packages purchased
10 =====
6
7 #--
11
12
13 #amount budgeted for the month
14
15 amountbudget = float (input ("Enter amount budgeted for the month: "))
16
17
18 a 1
19
20 total = 0.0
21
22 while a = 1:
23
24
25
26
27
28
29
b-float (input ("Enter an amount spent (0 to quit):"))
if (b== 0):
a = 0
else: total total + b
30
31 print ("amountbudget: $" + str (amountbudget))
32
33 print ("amountspent: $" + str (total))
34
String: Message String [AZ] [1-151]
35 if (amountbudget > total):
36
37
38
39 elif (amountbudget < total):
40
41
45
print("$" + str (amountbudget-total) +"under budget WELL DONE!")
print("s" + str (total- amountbudget) +"over budget PLAN BETTER NEXT TIME!, '.2f¹")
42
43 else: print ("The amount budget is the same as the amount spent WELL DONE!")
IDLE Shell 3.10.6
File Edit Shell Debug Options Window Help
amountbudget: $500.0
amountspent: $948.95
you are $448.95000000000005over budget PLAN BETTER NEXT TIME!
>>>
>>>
>>>
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit): 800
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
amountbudget: $500.0
amountspent: $948.95
= RESTART: C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
lab4.py
$448.95000000000005over budget PLAN BETTER NEXT TIME!
= RESTART:
lab4.py
Def
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit):822
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
amountbudget: $500.0
amountspent: $970.95
C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit):800
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
Hal
amountbudget: $500.0
amountspent: $948.95
X
$470.95000000000005over budget PLAN BETTER NEXT TIME!,.2f
= RESTART: C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
lab4.py
$448.95000000000005over budget_ PLAN BETTER NEXT TIME!, '.2f'
Ln: 189 Col: 0](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5d570369-f021-4a4c-bd42-feb213820226%2Fa4610ac2-58c4-4b8a-9cbb-b54c6f6d4677%2Fpthun85_processed.jpeg&w=3840&q=75)
Transcribed Image Text:File Edit Format Run Options Window Help
2# Program Name: Lab 3
Author: Cory Morris.
Location: c:\python\
3# Date written: 9/16/2022
4# Created to fulfill requirments for CoSC 1336, Sec. 014, Fall 2022
5#------
Programe Summary: Enter number of packages purchased, get the Total Amount and Discount
#-------
# Data Dictionary
# Name: Enter number of packages purchased
10 =====
6
7 #--
11
12
13 #amount budgeted for the month
14
15 amountbudget = float (input ("Enter amount budgeted for the month: "))
16
17
18 a 1
19
20 total = 0.0
21
22 while a = 1:
23
24
25
26
27
28
29
b-float (input ("Enter an amount spent (0 to quit):"))
if (b== 0):
a = 0
else: total total + b
30
31 print ("amountbudget: $" + str (amountbudget))
32
33 print ("amountspent: $" + str (total))
34
String: Message String [AZ] [1-151]
35 if (amountbudget > total):
36
37
38
39 elif (amountbudget < total):
40
41
45
print("$" + str (amountbudget-total) +"under budget WELL DONE!")
print("s" + str (total- amountbudget) +"over budget PLAN BETTER NEXT TIME!, '.2f¹")
42
43 else: print ("The amount budget is the same as the amount spent WELL DONE!")
IDLE Shell 3.10.6
File Edit Shell Debug Options Window Help
amountbudget: $500.0
amountspent: $948.95
you are $448.95000000000005over budget PLAN BETTER NEXT TIME!
>>>
>>>
>>>
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit): 800
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
amountbudget: $500.0
amountspent: $948.95
= RESTART: C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
lab4.py
$448.95000000000005over budget PLAN BETTER NEXT TIME!
= RESTART:
lab4.py
Def
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit):822
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
amountbudget: $500.0
amountspent: $970.95
C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
Enter amount budgeted for the month:500
Enter an amount spent (0 to quit):50
Enter an amount spent (0 to quit):75
Enter an amount spent (0 to quit):800
Enter an amount spent (0 to quit):23.95
Enter an amount spent (0 to quit):0
Hal
amountbudget: $500.0
amountspent: $948.95
X
$470.95000000000005over budget PLAN BETTER NEXT TIME!,.2f
= RESTART: C:\Users\CoryM_h7vhvbi\AppData\Local\Programs\Python\Python310\Morris
lab4.py
$448.95000000000005over budget_ PLAN BETTER NEXT TIME!, '.2f'
Ln: 189 Col: 0
Expert Solution

Step 1
Please find the asnwer below :
Step by step
Solved in 2 steps with 2 images

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