Khan12345678
Technical User
Hi guys, I'm stuck on a question which i could use some help on, i tried a code but it does not work properly. I have the data below in a separate text file. The question is as follow:
In an experiment, the forces N/m2
were measured at different location. At each location there
were six readings of forces. Each force has it
s weighting factor. The experimental data were stored in following format.
F1 F2 F3 F4 F5 F6 Average
Weighting
%
20 10 30 20 15 5
Point1 52.8 57.9 45.8 41.2 46.2 76.7
Point2 45.8 57.3 41.2 43.7 47.5 55.6
Point3 3.6 35.0 20.6 28.5 14.8 73.8
Point4 29.3 57.8 32.6 13.3 57.5 61.2
Point5 64.3 53.8 69.3 41.8 57.1 53.2
Point6 45.5 50.6 63.0 47.7 46.5 56.8
Point7 67.9 48.0 56.9 52.9 18.8 47.3
Point8 63.5 41.3 45.5 64.5 57.6 63.1
Point9 68.1 41.6 53.8 45.7 34.7 43.8
Point10 6.3 63.4 55.1 62.0 18.5 42.6
Write a program to:
1.
Read the relevant data from an input file (D
ata.txt) with appropriate format statements
in the table above.
2.
Calculate the average force at each point ta
king into account the weighting factors of
various forces.
3.
Write back to the table file including th
e average force column into a new file
(results.txt) using the same
format as task one.
Thanks
In an experiment, the forces N/m2
were measured at different location. At each location there
were six readings of forces. Each force has it
s weighting factor. The experimental data were stored in following format.
F1 F2 F3 F4 F5 F6 Average
Weighting
%
20 10 30 20 15 5
Point1 52.8 57.9 45.8 41.2 46.2 76.7
Point2 45.8 57.3 41.2 43.7 47.5 55.6
Point3 3.6 35.0 20.6 28.5 14.8 73.8
Point4 29.3 57.8 32.6 13.3 57.5 61.2
Point5 64.3 53.8 69.3 41.8 57.1 53.2
Point6 45.5 50.6 63.0 47.7 46.5 56.8
Point7 67.9 48.0 56.9 52.9 18.8 47.3
Point8 63.5 41.3 45.5 64.5 57.6 63.1
Point9 68.1 41.6 53.8 45.7 34.7 43.8
Point10 6.3 63.4 55.1 62.0 18.5 42.6
Write a program to:
1.
Read the relevant data from an input file (D
ata.txt) with appropriate format statements
in the table above.
2.
Calculate the average force at each point ta
king into account the weighting factors of
various forces.
3.
Write back to the table file including th
e average force column into a new file
(results.txt) using the same
format as task one.
Thanks