I am not sure where I am going wrong and I am not understanding it CPT 180
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
CPT 180 Chapter 9 Assignment 1 Directions Using the following guidelines, create a python program. 1. Download the file CPT180Stuff.zip. 2. Extract this file into the root directory of one of your computer's drives. For example, you could extract it on your C: drive or on to a USB drive such as E: drive. You should now have a folder named CPT180Stuff located in your selected location. (If using a Mac, copy the downloaded zip file to your documents folder. Extract the files here.) Create a program named workWithFiles1.py. Add four comment lines at the top of the program that contain: 3. 4. 5. a. Program Name b. Program Description c. Programmer's Name (You) d. Current Date Write code that will do the following: a. b. c. Print out the name of the current working directory. d. e. f. g. h. Print out the name of the current working directory. Change the current working directory to the CPT180Stuff folder. i. Create a new folder in the CPT180Stuff folder with the name "cellphones". In your code, check and ensure that the folder does not already exist prior to attempting to create it. Print out the contents of the CPT180Stuff folder as shown in Example Output. Print out the contents of the CPT180Stuff\cars folder as shown in Example Output. Print out the contents of the CPT180Stuff\pets folder as shown in Example Output. Print out the contents and file sizes of the CPT180\pets\cats folder as shown in the Exampl Output. The code should work for any folder contents. Print out the contents and file sizes of the CPT180\pets\dogs folder as shown in the Example Output. The code should work for any folder contents. 6. At the end of your code, using comment lines, answer the following question: a. What would be the result of the following code and what is the significance of the result: from pathlib import Path print(Path.home()) 7. Submit the workWithFiles1.py file into the Chapter 9 Assignment 1 Submission Folder. CPT 180 Chapter 9 Assignment 1 Directions Using the following guidelines, create a python program. 1. Download the file CPT180Stuff.zip. 2. Extract this file into the root directory of one of your computer's drives. For example, you could extract it on your C: drive or on to a USB drive such as E: drive. You should now have a folder named CPT180Stuff located in your selected location. (If using a Mac, copy the downloaded zip file to your documents folder. Extract the files here.) Create a program named workWithFiles1.py. Add four comment lines at the top of the program that contain: 3. 4. 5. a. Program Name b. Program Description c. Programmer's Name (You) d. Current Date Write code that will do the following: a. b. c. Print out the name of the current working directory. d. e. f. g. h. Print out the name of the current working directory. Change the current working directory to the CPT180Stuff folder. i. Create a new folder in the CPT180Stuff folder with the name "cellphones". In your code, check and ensure that the folder does not already exist prior to attempting to create it. Print out the contents of the CPT180Stuff folder as shown in Example Output. Print out the contents of the CPT180Stuff\cars folder as shown in Example Output. Print out the contents of the CPT180Stuff\pets folder as shown in Example Output. Print out the contents and file sizes of the CPT180\pets\cats folder as shown in the Exampl Output. The code should work for any folder contents. Print out the contents and file sizes of the CPT180\pets\dogs folder as shown in the Example Output. The code should work for any folder contents. 6. At the end of your code, using comment lines, answer the following question: a. What would be the result of the following code and what is the significance of the result: from pathlib import Path print(Path.home()) 7. Submit the workWithFiles1.py file into the Chapter 9 Assignment 1 Submission Folder.
Expert Answer:
Related Book For
Fundamentals of Cost Accounting
ISBN: 978-0077398194
3rd Edition
Authors: William Lanen, Shannon Anderson, Michael Maher
Posted Date:
Students also viewed these programming questions
-
The NMR spectrum of iodocyclohexane was taken at 280 C. At that temperature, the chair interconversion is slow and each chair conformation can be observed separately. The resonance of proton H a is...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Greety Food in Ashland, Kentucky, manufactures and markets snack foods. Sita Lee manages the company's fleet of 220 delivery trucks. Lee has been charged with *reengineering* the fleet-management...
-
Suppose that in Figure 7-2, the number of people employed were to expand by 9.2 million, and the number of people unemployed were to rise by 7.1 million. What would be the new values of the labor...
-
Are the number and influence of domestic safety regulations increasing or decreasing in the motor carrier industry? Are the number and influence of domestic environmental regulations increasing or...
-
The objective of a 9 9 Sudoku number puzzle is to fill the grid so that each row, each column, and each 3 3 grid contain the digits 1 through 9. How many different ways can the first row of a blank...
-
1. What type of installation did Hudson Banc use for its new system? Was it an appropriate choice? 2. How could the operational problems have been avoided? Two regional banks with similar geographic...
-
The capital structure of Cain is presented below: Debt @ 10% Common stock Total Common shares Cain $140,000 280,000 $420,000 28,000 Compute the stock price for Cain Auto Supplies if it sells at 17...
-
A pair of Helical Gear is used to transmit 10kW power from a multiple clutch to a constant mesh gear box. The clutch rotates at 7200 rpm, which further reduce the speed to 2400 rpm. Assume number of...
-
When a company received an expensive office painting with sags in the canvas, it complained. The seller, Central Park Gallery, responded with the following adjustment letter. How can it be improved?...
-
@RachelD to @CapitalOne. Shout out to @CapitalOne for immediately catching fraudulent activity on my account and resolving it in a 7-minute phone call! Prepare a response that acknowledges receipt of...
-
Weddings may take place in less than one hour, however the cost may be as much as $5,000. Your Task. In the following, identify the sentence fault (fragment, run-on sentence, comma splice). Then...
-
Define sukuk.
-
What is the reason for requiring companies to report geographic segments?
-
A limiting reactant in a chemical reaction is the substance that Is does not use up first: Select one O True O False
-
Consider the following cash flows in Table P5.5. (a) Calculate the payback period for each project. (b) Determine whether it is meaningful to calculate a payback period for project D. (c) Assuming...
-
How would you recommend accounting for variances at the end of the year? Why?
-
If costs increase from one period to another, will costs that are transferred out of one department under FIFO costing be higher or lower than costs transferred out using weighted average costing?...
-
Three entrepreneurs were looking to start a new brewpub near Sacramento, California, called Roseville Brewing Company (RBC). Brewpubs provide two products to customersfood from the restaurant segment...
-
Margin of error = \($5\), standard deviation = \($20\)
-
Margin of error = 18.2 cm, standard deviation = 95.2 cm
-
Margin of error = 0.5 g, standard deviation = 8.7 g
Study smarter with the SolutionInn App