Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Create a folder named files then download and store input.txt in it . 2 . Write program that will: a . Ask the
Create a folder named files then download and store input.txt in it
Write program that will:
a Ask the user for the input file name use exceptions to deal with a missing file
b Once the right file name is provided, create an output file named output.csv
i This file should also be stored in the files folder.
ii Please note, before you store output.csv in the files folder, you need to check if there already exists a file with that name in the folder. Use the ospath module not exception handling to check if the file already exists. If it does, ask the user if they want to overwrite it or if they would prefer creating a different output file refer to sample output for the logic Regarding the os module, the code below is enough to get you started.
iii. If no file exists with the name output.csv a new file with that name should be created. If the file already exists, ask the user if they want to overwrite it If they select y for yes, you can use the w file mode to overwrite the file. If they select n for no ask them for a new output file name.
c Once the output.csv file is successfully created, create a header row in it with the headers: Email, Time, and Confidence.
d Go through the lines in input.txt looking for lines that begin with please note the colons are part of the text
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started