Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use Python3 I already done the first part. I just dont know how to do second part. Vrite a Python function that performs the following:
Use Python3
Vrite a Python function that performs the following: Takes a single list of integers as an input. (An input "parameter" is required by AP) 2) Iterates through the list to compute the average of all the numbers in the list (Iteration is required by AP) 3) Returns True if the average is positive. Returns False if the average is negative (Selection is required by AP) Then, call the function in a broader program/function that does the following: 1) Sets a variable "num" to 0 2) Starts a "while" loop that will keep going until "num" == " N " or " n " 3) Keeps asking the user for a number and adds it each time to the list (AP requires user input) 4) Prompts the user to stop adding numbers by entering " N " or " n " instead of a number when done. Use num = input("Enter a number, or ' N ' when done") 5) Calls the first function above on the resulting list and tells the user whether his list had a positive or negative average in a sentence. (AP requires output) I already done the first part. I just dont know how to do second part.
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