Skip to content

Commit 286b7ed

Browse files
Update Assignment 7.2.py
1 parent 5608a5b commit 286b7ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Week 3/Assignment 7.2.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
7.2 Write a program that prompts for a file name, then opens that file and reads through the file, looking for lines of the form:
2-
X-DSPAM-Confidence: 0.8475
3-
Count these lines and extract the floating point values from each of the lines and compute the average of those values and produce an output as shown below.
4-
Do not use the sum() function or a variable named sum in your solution.
5-
You can download the sample data at http://www.py4e.com/code3/mbox-short.txt when you are testing below enter mbox-short.txt as the file name.
1+
#7.2 Write a program that prompts for a file name, then opens that file and reads through the file, looking for lines of the form:
2+
#X-DSPAM-Confidence: 0.8475
3+
#Count these lines and extract the floating point values from each of the lines and compute the average of those values and produce an output as shown below.
4+
#Do not use the sum() function or a variable named sum in your solution.
5+
#You can download the sample data at http://www.py4e.com/code3/mbox-short.txt when you are testing below enter mbox-short.txt as the file name.
66

77

88

0 commit comments

Comments
 (0)