Write a program to prompt for a file name, and then read through…
Question Answered step-by-step Write a program to prompt for a file name, and then read through… Write a program to prompt for a file name, and then read through the fileand look for lines of the form: X-DSPAM-Confidence:0.8475 When you encounter a linethat starts with “X-DSPAM-Confidence:” pull apart the line to extract the floating-pointnumber on the line. Count these lines and then compute the total of the spam confidencevalues from these lines. When you reach the end of the file, print out the average spamconfidence. Computer Science Engineering & Technology Python Programming COMPUTING 14 Share QuestionEmailCopy link Comments (0)


