Question: 2. (20 pts) The Python script below includes some syntax errors. Please find and correct them. Notes: You should write your answers as comments

2. (20 pts) The Python script below includes some syntax errors. Please find and correct them. Notes: You should write your answers as comments at the end of your 1st question's script. Your answers should indicate the line number where the error occurs and also the corrected version of that line. Answer Example: # Line 23 Corrected: name input(' What is %3D your name?") # Line 27 Corrected: x x+ 3 # Line 35 Corrected: strl, str2 = "Empty" %3D Warning: If your answer is not given like the format described in the above example, your answer will not be graded! numberl = int (input ('Enter an integer: ")) 2. print ('First number is', (nunberl}, number2 = input (2) number2 = int (number2) print (f'Second number is number2).') = numberl + number2 '.') 13 4 sum 7 print ('Sum of these two numbers is ', sum, 1.') 8. real div = sum / 2 print ('Average of these two numbers is real div = sum // 2+ (sum % 2) / 2 print (f'Average of {numberl, and number2) is (real div).') print () 6. real div + .') 10 11 12 O HN
Step by Step Solution
3.34 Rating (163 Votes )
There are 3 Steps involved in it
Line 1 corrected number 1 intinputEnter an integer Line 2 corrected printFirst numb... View full answer
Get step-by-step solutions from verified subject matter experts
