Question: In Python: First, the program reads a line of input that specifies which files are eligible to be found. That can be specified in one

In Python:

First, the program reads a line of input that specifies which files are eligible to be found. That can be specified in one of two ways:

The letter D, followed by a space, followed (on the rest of the line) by the path to a directory. In this case, all of the files in that directory will be under consideration, but no subdirectories (and no files in those subdirectories) will be. (You can think of the letter D here as standing for "directory.")

The letter R, followed by a space, followed (on the rest of the line) by the path to a directory. In this case, all of the files in that directory will be under consideration, along with all of the files in its subdirectories, all of the files in their subdirectories, and so on. (You can think of the letter R here as standing for "recursive.")

If this line of input does not follow this format, or if the directory specified does not exist, print the wordERROR on a line by itself and repeat reading this line of input; continue until the input is valid.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!