Question: Write code that will do the following: a . Print out the name of the current working directory. b . Change the current working directory
Write code that will do the following:
a Print out the name of the current working directory.
b Change the current working directory to the CPTStuff folder.
c Print out the name of the current working directory.
d Create a new folder in the CPTStuff folder with the name "cellphones". In your code,
check and ensure that the folder does not already exist prior to attempting to create it
e Print out the contents of the CPTStuff folder as shown in Example Output.
f Print out the contents of the CPTStuffcars folder as shown in Example Output.
g Print out the contents of the CPTStuffpets folder as shown in Example Output.
h Print out the contents and file sizes of the CPTpetscats folder as shown in the Example
Output. The code should work for any folder contents.
i Print out the contents and file sizes of the CPTpetsdogs folder as shown in the
Example Output. The code should work for any folder contents.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
