Write a program that reads the numbers from the file and totals the numbers. The program should print all the numbers and display the total when all the numbers have been added together. (Warning! The input from the file will be considered a string. Be sure to convert the input to int or float – just as you do when numbers are entered from the keyboard.)
numbers.txt has this list of numbers 75 78 91 55 99 85 63 81 93
total should be 720
data=open("numbers.txt").readlines()
total=0
for x in data:
for y in x.split(" "):
total=total+(int(y.strip()))
print(total)

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Write a program that reads the numbers from the file and totals the numbers. The program...
Write a program in C++ that reads in integer numbers from a file called scores.txt until the sentinel value -999 is read. The program should then output the total and average of the numbers read and output each of the numbers incremented by the overall average to a file called or scoresout.txt along with the sentinel value of -999 at the end So if 10, 20, 30 and -999 are read in then the program would display a total of...
Description: Create a program called numstat.py that reads a series of integer numbers from a file and determines and displays the name of file, sum of numbers, count of numbers, average of numbers, maximum value, minimum value, and range of values. Purpose: The purpose of this challenge is to provide experience working with numerical data in a file and generating summary information. Requirements: Create a program called numstat.py that reads a series of integer numbers from a file and determines...
Write a program that reads the integer numbers in a text file
(numbers.txt) and stores the numbers to a binary file
(binaryNumber.dat). (5 pts)
The number.txt file contains the following numbers:
1 2 3 4 5 6 7 8 9 0
7. Write a program that reads the integer numbers in a text file (numbers.txt) and stores the numbers to a binary file (binaryNumber.dat). (5 pts) The number.txt file contains the following numbers: 1 2 3 4 5 6 7...
Write a program that reads the integer numbers in a text file
(numbers.txt) and stores the numbers to a binary file
(binaryNumber.dat). (5 pts)
The number.txt file contains the following numbers:
1 2 3 4 5 6 7 8 9 0
IN JAVA PLZ
7. Write a program that reads the integer numbers in a text file (numbers.txt) and stores the numbers to a binary file (binaryNumber.dat). (5 pts) The number.txt file contains the following numbers: 1 2 3 4...
Write a Python program (question2.py) that reads from a file
called “input.txt” numbers in [1,39] separated in by commas. The
numbers are in [1-99]. The program will then convert each number to
a possible Roman Numeral equivalent, and print it on the screen.
Remember, I is 1, V is 5, X is 10
For example, if the input is: 23, 11 the output is: XXIII,
XI.
ROMAN NUMERALS CHART 1 TO 100 69 LXIX 11 2 11 3 III 4...
Write a program in C that reads 20 float numbers from a file. The values are stored in a vector (1-dimensional array). Find and display the smallest number, the second smallest number, and the third smallest number of the set. Use only these libraries: stdio.h, stdlib.h, math.h, and string.h. Below is an example of the input file (in1.txt) and the resulting output file (output.txt). In1.txt: 3.14 4.05 -3.73 4.13 1.32 -2.21 0.46 4.57 4.64 -3.42 4.57 -0.14 3.00 -3.58 -0.78...
Lab 10 Write a program that reads the integer numbers in a text file (numbers.txt) and stores the numbers to a binary file (binaryNumber.dat). The number.txt file contains the following numbers: 1 2 3 4 5 6 7 8 9 0
write a c++ program that reads some numbers from a text file then it displays how many of these numbers composed of the same digit For example(444 22 232 78 1111) so the program should displays 3 (using only while loops and if statment)
Write a program file_max.c that reads a set of integer numbers from a file and prints out the maximum number to standard output. The name of the input file should be specified as a command line argument.
Lab 10 Write a Java program that reads the integer numbers in a text file (numbers.txt) and stores the numbers to a binary file (binaryNumber.dat).The number.txt file contains the following numbers: 1 2 3 4 5 6 7 8 9 0