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: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, ericadawn2852
How do i draw hello world in python and how do i make it loop?
Answers: 1
image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, emilyplays474
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
image
Computers and Technology, 23.06.2019 12:30, umimgoingtofail
What is the difference between the internet and the world wide web?
Answers: 1
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 in other subjects:

Konu
History, 28.05.2021 18:10
Konu
Mathematics, 28.05.2021 18:10