Python Programming only (my code below) create a method to find the average Your method must perform the following  The method must take in at least one value as a parameter. The method must return a value You must use Exception handling in your method (My code below) numList = [] while(True):        variable = input("Enter a number or Enter done to quit: ")          if(variable=='done'):                 break          numList.append(int(variable)) # display the information print("The total amount of numbers entered : ",len(numList)) print("The total of numbers : ",sum(numList)) print("The average of all numbers : ",sum(numList)/len(numList)) print("The largest number is: ",max(numList))

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter11: Exception Handling
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

Python Programming only (my code below)

  • create a method to find the average

Your method must perform the following 

  • The method must take in at least one value as a parameter.
  • The method must return a value
  • You must use Exception handling in your method

(My code below)

numList = []

while(True):
  
    variable = input("Enter a number or Enter done to quit: ")
    
    if(variable=='done'):
       
        break
    
    numList.append(int(variable))
# display the information
print("The total amount of numbers entered : ",len(numList))
print("The total of numbers : ",sum(numList))
print("The average of all numbers : ",sum(numList)/len(numList))
print("The largest number is: ",max(numList))

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Exception Handling Keywords
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,