I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Bonus time

Enter the code below. The code will work out if a worker will get a bonus of £50 or not. If they have earned £200 then they get a bonus. For example if I earned £320 then my wage would be £370, however if I earned £180 then I would not get a bonus.

A program has been written but has 3 mistakes.

Change the code as follows

  • Change the bonus to be 50 instead of 80.
  • Change the condition “money < 200” to be greater than 200.
  • Change the calculation money – bonus so that it adds the bonus instead.
money = int(input("Enter your salary - "))
bonus = 0
if money &amp;lt; 200:
     bonus = 80
print ("Your wage is ", money - bonus)



Comments are closed.

Information