Question: TWO QUESTIONS - USE PYTHON LANGUAGE 3. Use the Design Recipe to write a function called runningTotal that repeatedly asks the user to input integers

TWO QUESTIONS - USE PYTHON LANGUAGE

3.

Use the Design Recipe to write a function called runningTotal that repeatedly asks the user to input integers at the keyboard until they type the word done. Print the sum of the values they entered. You may assume the user will only enter integers or "done".

For example:

Test Input Result
runningTotal() 3 5 done 8

10.

Given the following code:

def test(number, boolean): if number >= 90 and boolean: return "Tic" elif number >= 20: return "Tac" else: return "Toe" 

Write code that prints the result of calling the test function with each of the interesting 6 combinations of cases. Your code should end up printing:

Tic Tac Tac Tac Toe Toe 

Note: you should have exactly 6 lines of code in your submission, each one of the form

print(test(___, ___)) 

with values in the blanks.

The quiz server will match your output to the above AND print out of how many of the 6 interesting cases your tests covered.

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!