Calculate and return the average back

Assignment Help Computer Engineering
Reference no: EM132212355

Write a Python program:

Program will use a text file data_xxxxxxx.txt to write 15 numbers in the range of 0 to 100 (one number in each line), where xxxxxxx represents your ID number.

Then the program will read these values into a list named numbers.

Call a function get_average( ) and pass the list to it. The function will calculate and return the average back.

Call a function sort_list( ) to sort scores in the list in ascending order - use any popular algorithm such as bubble sort, insertion sort or merge sort.

Call a function get_max( ) and pass the list to it. The function will find the highest score and return it back.

Call a function get_min( ) and pass the list to it. The function will find the lowest score and return it back.

(Your program will not use any pre-written Python functions to find average, max and min. You will write logic for the same)

Append average, maximum and minimum scores in separate lines into the text file data_xxxxxxx.txt with appropriate messages such as "average score is 90".

Reference no: EM132212355

Questions Cloud

Write a recursive function that accepts two arguments : Write a recursive function that accepts two arguments into the parameters x and y.
Compute the sum of the elements of an integer array : Write a recursive algorithm that computes the sum of the elements of an integer array. Prove your algorithm is correct using induction.
Test the function in the main function : Write a recursive function named "sum" with one input parameter, an integer n. The function returns the sum of numbers 1, 2, 3... n.
Determine the computational complexity : Give a concrete example and show the steps you will use to determine the computational complexity (of the real program)
Calculate and return the average back : Call a function sort_list( ) to sort scores in the list in ascending order - use any popular algorithm such as bubble sort, insertion sort or merge sort.
Determine the length of the entered string : If the entered string is one or more characters in length display the following information about the string and exit the program.
Write the r command to produce a table with the same row : Write the R command to produce a table with the same row and column headings, but the entries are the average temperature for that month and year.
Write a query to display the manager name : Write a query to display the manager name, department mname, department phone number, employee na,e. customer name, invoice date.
Take a string parameter and returns a string containing : Write a function called scramble_words, which takes a string parameter and returns a string containing the same words but randomly reordered.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a matlab program to implement a laplacian of gaussian

Write a Matlab program to implement a 7´7 Laplacian of Gaussian filter on 256x256 image using Fourier Transformasation.

  Make a list of your favorite fruits

Make a list of your favorite fruits, and then write a series of independent if statements that check for certain fruits in your list.

  Create a single letter frequency distribution

Write a Python function that takes a filename and creates a single letter frequency distribution for all the chars (i.e. bytes) occuring in the file.

  Write down fucntion defintion for the line class constructor

write down fucntion defintion for the Line class constructor.

  Identify evaluations that only exist in one

Compare the in-house evaluation and external evaluation. Identify evaluations that only exist in either one of the evaluations.

  Write a paper on computer i-o architecture and organization

Write a paper on computer I-O architecture and organization.

  Create a test driver that exercises this new feature

Without using a TreeIterator, create a new method called total that takes an no arguments and determines that the sum of all the elements stored in the BinarySearchTree. Create a test driver that exercises this new feature, prints the tree and the ..

  How to write a sql insert statement

Write down a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection (use salaries to restrict the data).

  Write a java application that prompts the user for pairs

Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (these are two separate prompts for input values).

  Write out the state of the array after each pass

Using pen and paper, write out the contents of the array after each pass of the insertion sort algorithm for the following arrays.

  Give a formal definition of the term deque

Give a formal definition of the term deque, using the definitions given for stack and queue as models.

  What does the graph show you about the relative importance

What does the graph show you about the relative importance of the software qualities? Are there any cycles in the graph? What does a cycle imply?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd