D522 Python for IT Automation - Set 4 - Part 1
Test your knowledge of technical writing concepts with these practice questions. Each question includes detailed explanations to help you understand the correct answers.
Question 1: What is the primary goal of IT automation with scripting?
Question 2: Which os function returns the current working directory?
Question 3: Which os function changes the current working directory?
Question 4: How can you access an environment variable named PATH in Python?
Question 5: Which os.path function joins path components in a cross-platform way?
Question 6: Why should os.path.join be used instead of manual string concatenation for paths?
Question 7: Which os.path function returns the file name portion of a path?
Question 8: Which os.path function returns the directory portion of a path?
Question 9: Which pathlib class provides an object-oriented interface to filesystem paths?
Question 10: What is idempotency important for in automation?
Question 11: Which practice makes an automation script safer to re-run?
Question 12: What is a cron job used for on Unix-like systems?
Question 13: Which Windows tool schedules automated tasks?
Question 14: What does a script's exit code (return code) of 0 conventionally indicate?
Question 15: How do you set a script's exit code in Python?
Question 16: Why are exit codes important for automation pipelines?
Question 17: What is the benefit of parameterizing a script with command-line arguments?
Question 18: What should sensitive credentials in automation scripts be stored in?
Question 19: Why should credentials never be committed to version control?
Question 20: What does the paramiko library enable in Python automation?
Need Guaranteed Results?
Our exam support service guarantees you'll pass your OA on the first attempt. Pay only after you pass!
Get Exam Support