Question
By using Python3.6 : Write a script named calculations.py that repeatedly asks the user to enter a number (or the word done). When the user
By using Python3.6: Write a script named calculations.py that repeatedly asks the user to enter a number (or the word done). When the user enters in done, the script should display the sum of all the numbers entered so far, how many numbers have been entered, the average of all the numbers, and the largest number entered. When detecting whether the user entered done or not, your script should be case-insensitive.
Here's what my version of calculations.py looks like when I run it (the black text represents input that the user typed in). Yours doesn't have to look identical to this, but it should be close. For example, your script needs to say what it wants from the user (including how to stop), and it should state what the values printed at the end represent.
How can I get the entered numbers, the sum, the average and the largest number? I have done so far:
when done): Please enter a number (enter "done" when done): 2.5 Please enter a number (enter "done" when done) Please enter a number (enter "done" when done): done You have entered 3 numbers. The sum of all the numbers is 0.5 The average of all the numbers is 0.16666666666666666 The largest number entered is 5.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started