Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

Students also viewed these Databases questions