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".
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.
|