subject
Computers and Technology, 22.02.2021 14:00 nisha87

Could somebody please find the bugs and amend them? This question is worth 25 points! -

#Tax Calculator with 4 bugs

salary = int(input("Please enter your annual salary: £"))

if salary < 30000
#Salaries under 30000 are taxed at 20%
tax = salary * 0.2
elif salary >= 30000:
#Salaries over 30000 are taxed at 40% for anything over 30000
salary = salary - 30000
tax = salary * 0.4 + 6000
else:
#Salaries over 150000 are taxed at 45% for anything over 150000
salary = salary - 150000
tax = salary * 0.45 + 6400 + 48000

print("Earnings of £",salary,"will attract taxes of £",round(tax,2))
input("Press ENTER to quit")


Could somebody please find the bugs and amend them? This question is worth 25 points!

---

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, kieraweems2034
Communication is the exchange of information. true false
Answers: 2
image
Computers and Technology, 23.06.2019 12:00, xojade
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, ariyanadavid5989
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, yola32
What is the most important for you to choose before you build a network?
Answers: 1
You know the right answer?
Could somebody please find the bugs and amend them? This question is worth 25 points! -

...

Questions in other subjects:

Konu
Social Studies, 10.03.2021 21:00
Konu
Biology, 10.03.2021 21:00
Konu
Mathematics, 10.03.2021 21:00
Konu
Mathematics, 10.03.2021 21:00