Question: The following will be completed by using a function and user input. Create a script that tests for 3 files and one directory called the

The following will be completed by using a function and user input.
Create a script that tests for 3 files and one directory called the following:
Malicious.txt
Trojan.txt
Trojan.zip
Directory = hackers
Use the path.exists() method to complete the following instructions.
Use your script to test for each of these files and directory based on the names from the user input.
If each file or directory exists, print out a statement indicating that they are found based on the names provided by the user.
Print an additional warning statement if any of the files or directories listed above exist.
Print out a false statement for any file or directory that doesnt exist.
Use an if statement to delete the Trojan.zip file if it exists in your folder.
Add positional parameters to your function.
Add input statements which will be passed as positional arguments to your function.
Print out a statement anywhere in your script with your name.
Call your function without any errors in your script.
The following will be completed by using a

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 Programming Questions!