Question: Please code in Python! Sorry about that. Write a program that will do the following, in order: 1. Under your home directory, print to the

Please code in Python! Sorry about that.

Write a program that will do the following, in order: 1. Under your home directory, print to the console, the name of your current directory 2. Under your home directory, create a directory called "Stage9" 3. Change directory to "Stage9" 4. Print to the console the name of the current directory 5. Using a loop, create (touch) 10 files with the name of "test_.txt" where is the number from 1 to 10 6. Using a loop, create 5 sub-directories with the name of "subdir_" where is the number from 1 to 5 7. List all entries within the "Stage9" sub directory in the following format: Note: Do NOT print the "." and ".." directories

Name Type

------- ------

8. Rename all files that end with .txt to .dat 9. Repeat step 7

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!