# Problem solving unit 2 worksheet 4 Task 2 questions 2 and 3 # enter 2 and 7, -4 and -4, 27 and 3 print("In this exercise you will enter values for x and y ") print("to test if your predicted output is correct.") print("Please enter value for x") x = int(input()) print("Please enter value for y") y = int(input()) z = x if x == y: x=x*x y=(x + y)/2 else: if x < y: y = y*y z = y - x else: if x > 0: z = x/y #endif #endif y = 200 #endif print ("x = ",x," y = ", y, " z = ",z) print("Question 3") x = 5 k = 10 sum = 45 while sum < 75: sum = sum + k print (k) k = k + x print ("Sum =",sum)