# Python problems for Friday # # 1. What are the values of lst1, lst2, lst3, and lst4? lst1 = range(10) lst2 = range(5, 10) lst3 = range(100, 0, -5) lst4 = range(10, 0) #2. Give a range() command to generate the following lists: lstA is [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0] lstB is [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] lstC is [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] lstD is [10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10] #3. What are the values of x, y, and z as each line is executed? x, y, z = 3, 2, 1 z, y, x = x, y, z x, y, z = x, x, z x, y, z = z, y, x #4. What is printed given the following: def f(x): return x + x print f(2) print f(f(3)) print f(f(2)+f(3))