Question: HNM [12] 1. Consider the function which, defined below. def which (x, y): if x > 3 and y y or x > 7: print

 HNM [12] 1. Consider the function which, defined below. def which(x, y): if x > 3 and y y or x >7: print ('B') else: print('C') What is printed by each of these

HNM [12] 1. Consider the function which, defined below. def which (x, y): if x > 3 and y y or x > 7: print ('B') else: print('C') What is printed by each of these function calls? a. which (1, 9) b. which (4, 2) c. which (8, 9) d. which(1, 0) [15] 2. What is printed by the Python code? (Note: The code prints each time through the loop body!) x = 22 y = 2 while x > 5: if x > 10: x = x - y y = 2*y #6 else: x = x - 2 print (x, end='') #8 OWNA [13]3. What is printed by the Python code? Remember 'e' is not equal to 'E'. for word in ['And', 'THE', 'is', 'OH', 'a']: #1 if word. upper() == word: print (word.lower()) : 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!