1. The function ask_ok is defined as following def ask_ok (prompt,retries=4,complaint='Yes or no, please!'): while True: input (prompt) if ok in ('y', 'ye', 'yes'): ok = return True if ok in ('n',...


1. The function ask_ok is defined as following<br>def ask_ok (prompt,retries=4,complaint='Yes or no, please!'):<br>while True:<br>input (prompt)<br>if ok in ('y', 'ye', 'yes'):<br>ok =<br>return True<br>if ok in ('n', 'no', 'nop.', 'nope'):<br>return False<br>retries<br>retries<br>if retries < 0:<br>raise OSError('uncooperative user')<br>print (complaint)<br>What' s the output for each of the function call?<br>a. ask_ok ('Do you really want to quit?')<br>b. ask ok ('OK to overwrite the file?',<br>2)<br>c. ask_ok ('OK to overwrite the file?',2,'Please,yes or no!')<br>

Extracted text: 1. The function ask_ok is defined as following def ask_ok (prompt,retries=4,complaint='Yes or no, please!'): while True: input (prompt) if ok in ('y', 'ye', 'yes'): ok = return True if ok in ('n', 'no', 'nop.', 'nope'): return False retries retries if retries < 0:="" raise="" oserror('uncooperative="" user')="" print="" (complaint)="" what'="" s="" the="" output="" for="" each="" of="" the="" function="" call?="" a.="" ask_ok="" ('do="" you="" really="" want="" to="" quit?')="" b.="" ask="" ok="" ('ok="" to="" overwrite="" the="" file?',="" 2)="" c.="" ask_ok="" ('ok="" to="" overwrite="" the="" file?',2,'please,yes="" or="">

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here