subject

Write a program that receives a filename as user input. The file is structured as multiple lines containing numbers separated by a single space. For example, this would be an acceptable file:
1 2 3 4 5 6 7 2
Your program should open this file and:
1. print all its contents;
2. write the median of all numbers to a new file called result. txt.
IMPORTANT NOTES:
a. the median is the element in the middle when you sort the values;
b. the median of values (2, 1, 3) is 2, because when you sort them, you get 1, 2, 3, and 2 is the value in the middle.
c. you can assume there will be no empty lines;
d. there might be any arbitrary number lines in the file;
e. there might be any arbitrary number of elements in a single line;
f. you can assume there will always be an odd number of elements.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word β€œforeshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
You know the right answer?
Write a program that receives a filename as user input. The file is structured as multiple lines con...
Questions
question
Physics, 03.07.2019 00:20
question
Mathematics, 03.07.2019 00:20
Questions on the website: 13722360