Bart H.
asked 04/19/21Computer Science I- Programming
I need help to prompt the user to enter a filename in write mode using this input
(Enter an output filename (or press enter to quit): )
1 Expert Answer
George D. answered 05/03/21
Computer Science Student at the University of Central Florida
Since no language was specified this is written in python. The program will save an input and then check if the input is empty. If the input is empty, that means Enter was pressed. After it gets the input it will check if filename is anything other than empty input (which is Enter key). If the input contains something then it opens the file in write mode, or creates it if it doesn't exist, then writes to the file (since an output wasn't specified I put OUTPUT as example). If the input is empty, meaning the Enter key was pressed, then the program won't do anything with it.
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Abner R.
Will this be in any programming language?04/22/21