Trial and error
1.Spot and list all the errors in the code below. It should find the average of a set of numbers.
</pre> <pre class="python">nums = [4, 21, 5, 76, 4 , 87, 45, 32] total = 0 a = 4 while a < 5 total ++ a a += 1 print “average is “ , total / nums</pre> <pre class="python">
2.Now compile the program in any Python IDE (e.g. Geany) and see whether your error list matches Geany’s

You need to log in or create an account to submit code!











