Answered step by step
Verified Expert Solution
Question
1 Approved Answer
($SST,0.06); $ totalPurchased =40.30; $2 discount =0; if ($ TotalPurchased $30) else $2 discount =5; echo ($2 discount =2; $> (i) Based on the code
($SST,0.06); $ totalPurchased =40.30; $2 discount =0; if ($ TotalPurchased $30) else $2 discount =5; echo ($2 discount =2; $> (i) Based on the code snippet above, examine THREE (3) mistakes made by the author and identify the solution to solve the mistakes. ( 9 marks) (ii) Rewrite the if-else statement above with the ternary operator
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started