There are three types of errors that you may encounter while programming: - Syntax Errors - Runtime Errors - Logical Errors Syntax Errors These errors are usually easiest to identify and correct. Syntax errors are errors in the code that the interpreter cannot understand. In Python these are often: - spelling errors - omission of important characters missing quotos around string missing colon using = instead of == in comparisons mismatched number of opening and closing parantheses - inconsistent or improper use of indentation - using keywords as variable name - variable name conventions not followed - example: using unallowed characters in variable names - inconsistent use of case (Python is case-sensitive) The Python interpreter will usually indicate, where and what the error in the code is. Pay close attention to the error messages. Runtime Errors These are errors that are not detected until the program is executed (run time) Some common reasons: couldn't find the data - doesn't exist invalid data type for an operation/action to be performed. Logic Errors These are errors in code that do not throw an error at all, but simply do not do what you intended the code to do. This type may require extensive testing to identify errors. Use the program below, check for errors (syntax, runtime, logical). Problem statement - Get the user input for retail price of the product. Apply 18% discount and display the discounted price of the product formatted to twe decimal places. If the discounted price is greater than 100 then apply sales tax of 10% and calculate the final price. Display the final price formatted to two decimal places. \# This program performs several operations on the input data \#Get user input - retail price for the product purchased retailPrice = float(input('Enter the retail price of the product: 7 discount =0.18 HCalculate discount amount discountAmount = retailPrice 0.18 HCaiculate discounted price for the product discountedPrice = rotailPrice - discountAmount "Display the discounted price print('Discounted amount is \$discountedPrice:.2f) Wif the discounted price is more than $100 include 10% sales tax Hand display the final amount salesTax =0.10 If discountedPrice