Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Make the following programs in sequence. Be sure to save the programs in the same directory as where you start the idle shortcut and where
Make the following programs in sequence. Be sure to save the programs in the same directory as where you start the idle shortcut and where you have all the sample text files: a. printUpper.py: read the contents of the sample2.txt file and print the contents out in upper case. (This should use file operations and should work no matter what the contents are in sample2.txt. Do not assume the particular string written by nextFile.py!) b. fileUpper.py: prompt the user for a file name, read and print the contents of the requested file in upper case c. copyFileUpper.py: modify fileUpper.py to write the upper case contents string to a new file rather than printing it. Have the name of the new file be dynamically derived from the old name by prepending UPPER' to the name. For example, if the user specified the file sample.txt (from above), the program would create a file UPPERsample.txt, containing 'MY FIRST OUTPUT FILE!'. When the user specifies the file name stuff.txt, the resulting file would be named UPPERstuff.txt
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