Question: Using a Python environment, complete two small Python programs - Write a function which repeatedly reads numbers until the user enters done Once done is

Using a Python environment, complete two small Python programs -

  1. Write a function which repeatedly reads numbers until the user enters done
  • Once done is entered, print out the sum, average, maximum, and minimum of the values entered
  • If the user enters anything other than a number, detect their mistake using try and except and print an error message and skip to the next number.

2. Write another function so that it draws a sideways tree pointing right; for example, if the user enters 4, the program would print

*

**

***

****

***

**

*

Capture screenshots of a few of your test runs

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!