BANA3020 Lab5
BANA3020 Lab5
BANA3020 Lab5
Control
BANA3020 Introduction to Programming with Python November 7, 2023
(a) No submission by the deadline will incur 0.25 point deduction for each problem (most of the
problems are due at the end of the lab session).
(b) The instructor will deduct an additional 0.25 point per problem for each day past the deadline.
(c) The penalty will be deducted until the maximum possible score for the lab practice reaches zero
(0%) unless otherwise specified by the instructor.
• If the revenue is greater than the expenses, print "The business made a profit of $X" (where X is the
profit amount).
• If expenses are greater than or equal to revenue, print "The business incurred a loss of $Y" (where Y is
the loss amount).
• If the purchase amount is between $100 and $500, apply a 10% discount.
• If the purchase amount is greater than or equal to $500, apply a 20% discount.
1 Purchase amount : 75
2 Expected result : There is no discount , your final price is $75 .0.
Test Case 2: 10% Discount for Purchase Between $100 and $500
• Ask the user for the number of years of experience the employee has.
Then, use multiple if statements to calculate the salary with the following conditions:
Calculate and print the final salary of the employee, including the bonus.
• If the credit score is above 700 and the annual income is greater than $50,000, approve the loan.
• If the credit score is between 600 and 700 (inclusive) and the annual income is greater than $60,000,
approve the loan.
• If the credit score is below 600 or the annual income is less than $40,000, deny the loan.