Question: Written #1 Each of the code snippets below would generate some kind of error. Identify whether cach one is a... Name Emer: A variable or
Written #1 Each of the code snippets below would generate some kind of error. Identify whether cach one is a... Name Emer: A variable or function has been used before it has a value TypeError: A function/operation is applied to a value of the wrong type IndexError: A list or string subscript is out of range 1A 1 1st = [4, 5, 6] 2 ist[@] + lst 1st = [18, 0, -5] Ist[3] + 3 ist = [1, 2, 3] 1st[1] + "4" 2 Written #2 What do each of the following code snippets print to the terminal? N nested = [[3, 4, 5], [8, 9, 10]] for i in range (len (nested)): print(nested[i]) nested = [[3, 4, 5], [8, 9, 10]] for i in range (len (nested)): for j in range (len (nested[i])): print (nested[i][j])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
