
Complete Python Scripting for Automation - Find all files in a directory with required extension.py/.sh/.log/.txt etc…
Interactive Video
•
Information Technology (IT), Architecture, Business, Other
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary goal of the Python script discussed in the video?
To rename files in a directory
To find files with specific extensions in a directory
To create a new directory
To delete files in a directory
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the script initially prompt the user to enter?
A password
A file name
A directory path and file extension
A username
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Python module is used to check if a path is a file or directory?
os
sys
shutil
pathlib
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the user provides a file path instead of a directory path?
The script renames the file
The script deletes the file
The script stops and asks for a directory path
The script continues without any issue
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the script do if the directory is empty?
It informs the user that the directory is empty
It creates a new file in the directory
It lists all files
It prompts the user to enter a new path
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the script handle files that do not match the specified extension?
It ignores them
It renames them
It deletes them
It moves them to another directory
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'append' operation in the script?
To remove files from a list
To add files to a list
To sort files in a list
To rename files in a list
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?