Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: 4. Directions Using the following guidelines, create a pytho Directions Using the following guidelines, create a python program 1. You wil be using the

image text in transcribedimage text in transcribedimage text in transcribed

Question: 4. Directions Using the following guidelines, create a pytho Directions Using the following guidelines, create a python program 1. You wil be using the CPT180Stuff folder from the Bash Assignment for this assignment. 2. Create a PowerShell program named work with les4.ps! 3. Add three comment Ines at the top of the program that contain: a. Program Name b. Program Description C. Programmer's Nome (You) 4. Write code that will do the following: a. Using an it statement, determine if both the dognames.txt file and the catnames.txt file exist. If both files exist, the program should complete steps b-h below. If either file does not exist. The program should print out the message "Unable to access one or more files". b. Get the contents of the file named dognomes.txt in the CPT180Stuff\pets\dogs folder. C Print the contents of the file. d. Get the contents of the file named catnames.txt in the CPT 180Stuff pets cats folder. e. Print the contents of the file. F. Add two cat names to the catnames.txt file. You can pick the names. The example output below shows the names Sammy and Luna added. 9. Get the contents of the file named catnames.txt. n. Print the contents of the file. 5. Submit the work With Files4.pl file into the PowerShell Assignment Submission Folder. Hints 1. The PowerShell Add-Content command adds a newine by default ype cars 2/15/2021 11:31 PM 2/15/2021 11:31 PM 8/6/2018 11:19 AM File folder File folder pets cpt 180 Text Document 1 KB This PC 2TB Harddrive (D.) CPT180 Screenshots > cpt180Stuff cars Name Date modified Type Size familycars sportscars 2/15/2021 11:31 PM 2/15/2021 11:31 PM File folder File folder > This PC 2TB Harddrive (D:) CPT180 Screenshots cpt180Stuff > cars > familycars familycars familycars familycars - Notepad File Edit Format View Help Chevrolet Impala Honda Accord Ford Taurus Kia Optima Voltswagon Jetta Chrysler 300 This PC 2TB Harddrive (0) CPT130 Screenshots cpt180Stuff > cars > sportscars sportscars sportscars sportscars - Notepad File Edit Format View Help Ford Mustang Chevrolet Corvette Pontiac GTO Oldsmobile 442 Porsche 911 Dodge Charger This PC 2TB Harddrive (D:) CPT180 Screenshots cpt 180Stuff pets Name Date modified 2/15/2021 11:31 PM dogs 2/15/2021 11:31 PM Type cats File folder File folder This PC 2TB Harddrive (D:) . CPT180 Screenshots cpt 180Stuff > pets cats (C:) catnames cats catrames - Notepad File Edit Format View Help Misty Felix Fluffy Kimba Tom This PC > 2TB Harddrive (D:) CPT180 Screenshots opt180Stuff pets dogs dognames - Notepad File Edit Format View H Spot Max Lassie Rover dognames dogs Snoopy cpt180 - Notepad File Edit Format View Help College CPT 180 Shell Scripting 3 Credit Hours Example Output Spot May Rover 9 Misty Felix Fluffy Kita Ton Martin Sesy LACY Misty Felis Fluffy Kini Ton Tiger Sey Lucy Sam

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

=+ d. a professor deciding how much to prepare for class

Answered: 1 week ago