subject

Write a program that lets the user enter in a file name (numbers. txt) to read, keeps a running total of how many numbers are in the file, calculates and prints the average of all the numbers in the file. This must use a while loop that ends when end of file is reached. This program should include FileNotFoundError and ValueError exception handling. Sample output: Enter file name: numbers. txt There were 20 numbers in the file. The average is 4.35

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
What important technology has done the most to allow a businesses a chance to compete with larger international companies
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Create a string list. 2. use console.readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value.tochararray(); if (array.length > = 1) { if (char.islower(array[0])) { array[0] = char.toupper(array[0]); } } for (int i = 1; i < array.length; i++) { if (array[i - 1] == ' ') { if (char.islower(array[i])) { array[i] = char.toupper(array[i]); } } } return new string(array);
Answers: 3
You know the right answer?
Write a program that lets the user enter in a file name (numbers. txt) to read, keeps a running tota...
Questions
question
Mathematics, 19.05.2020 20:08
question
Mathematics, 19.05.2020 20:08
question
Mathematics, 19.05.2020 20:08
question
Mathematics, 19.05.2020 20:08
question
Mathematics, 19.05.2020 20:08
Questions on the website: 13722360