Module checkpoint

Python essentials for engineers knowledge check

Answer every question from your current understanding. After submission, compare your reasoning with the explanation and revisit any weak concept.

5 QuestionsOne Answer eachImmediate ScoreDetailed Explanations
Read→Reason→Select→Review
Question 1 of 5What does `if __name__ == '__main__':` achieve in a script?
Question 2 of 5Which expression joins a folder and a file name with pathlib?
Question 3 of 5What exit status does argparse use when the user gives invalid arguments?
Question 4 of 5Why should main() catch specific exceptions such as FileNotFoundError instead of using a bare except?
Question 5 of 5Why does the file-list script sort the sources it finds?

Review every selection before submitting. You can retry after reading the explanations.