Fun with Statistics Part II In this practice program, you will be modify the program you wrote for Practice 5 – Fun with Statistics, to append the user

Fun with Statistics Part II

In this practice program, you will be modify the program you wrote for Practice 5 – Fun with Statistics, to append the user input to a list. When the user is done entering integers, loop through the list to find the sum, average, minimum, and maximum integers entered (and any other statistics you calculated). Look at the Python Practice page in the unit for examples of appending to a list.

Use tools we have learned so far in the course in your solution. This week we learned about using lists, indexes, append(), remove(), iterating over lists, passing lists to functions and accumulators. Those tools combined with the tools from previous Units are the tools you should use in this assignment. There will be plenty of time to practice more advanced topics in the future.

  • Make a copy of practice5.py and name it practice7.py. Do not edit practice5.py – you may need to go back and start over, so always start with a copy! Watch the Getting Started with PyCharm tutorial on how to make a copy of your project.
  • Start with the end – design what the user will see when they run your program. Add this sample run as comments in your code.
  • Design first, then write your Python program.

Requirements:

  • Have a main() function.
  • Modify your program to store the user integers into a list.
  • Have a function for every input, process (calculation), and output.
  • Your program must use at least 1 FOR loop to iterate over the list and calculate the sum, average, minimum and maximum. Do not use the Python methods sum, min, max or ave.
  • Your program should have function(s) to find the sum, average, minimum and maximum integers entered.
    • Hint 1: The functions for sum, min, max and average should all be called after the WHILE loop from the Practice 5 has added all values to the list.
    • Hint 2: Call the sum function in the average function when calculating the average.
  • Your program must use input validation to only allow integers to be entered and ‘y’ or ‘n’ to continue entering integers.
  • Declare result variables in functions. Do not return an equation. Assign the result variable(s) the equation result, the return the result variable(s).
  • Include a function comment in each function with a description, parameters, and return values. Use “”” “”” to create your comment, take a look at the Lab 3 sample program for an example.
  • Your functions should call the functions in valid.py to prompt for and return valid integers and floats, then validate for the amounts in the functions you create.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

NCL Labs submission must be on the webportalOpen Source Intelligence  8Challenges10 Questions Cryptography  8 Challenges14 Questions  Password

NCL Labs submission must be on the webportal Open Source Intelligence  8Challenges10 Questions Cryptography  8 Challenges14 Questions  Password Cracking 7 Challenges10questions Forensics  6 Challenges10Questions Log Analysis 8 Challenges10 Questions Network Traffic Analysis 8 Challenges15Questions Scanning & Reconnaissance  3 challenges 10questions Web Application Exploitation  5 Challenges10 Questions Wireless Access Exploitation  

Assessment 3: Programming Project and Report  Due date:  Week 9  Group/individual:  Individual Word count/Time provided:  Report 1000 words + code (equiv.

Assessment 3: Programming Project and Report  Due date:  Week 9  Group/individual:  Individual Word count/Time provided:  Report 1000 words + code (equiv. 2500 words)  Weighting:  40%  Unit Learning Outcomes:  ULO1, ULO3 Assessment 3 Detail  Python Programming Assessment: Restaurant Menu Management System  This assessment evaluates your ability to utilise Python’s data structures

Machine learning questions. 4 questions. look at attached  1. Please construct a new dataset by either adding two independent variables or removing two

Machine learning questions. 4 questions. look at attached  1. Please construct a new dataset by either adding two independent variables or removing two independent variables from finalsample.dta dataset. If you choose to add two independent variables, you could add any two independent variables that you think help explain stock returns. If you choose to remove two independent variables, you