PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 1


What is true about Python packages? (Choose two.)

Show Answer
Correct Answer: CD

A package in Python may contain an __init__.py file which is intended to initialize the package's state; however, the correct name for this file is __init__.py, not init.py. The __pycache__ folder is used to store semi-compiled (bytecode) Python modules, which are generated when the Python interpreter executes scripts for better performance. The sys.path variable is indeed a list of strings that specifies the directories the interpreter should search for modules being imported. Therefore, the correct statements are that __pycache__ is a folder that stores semi-compiled Python modules and that the sys.path variable is a list of strings.

Discussion

5 comments
Sign in to comment
DKAT2023Options: CD
Jul 4, 2024

sorry, only C and D are corrects , for A the correct file name is _init_.py not init.py

surendrapattipati
May 28, 2024

A. a code designed to initialize a package’s state should be placed inside a file named init.py

Damon54
Jun 6, 2024

A C e D are correct !!

Damon54
Jun 26, 2024

PASS Exam Today ! The contents and concepts are contained in these 40 and 141 questions PCAP , but there are several questions taken up 30% with modifications, so be careful, it is necessary to study!!! There are no syntax errors in the exam questions

DKAT2023Options: AC
Jun 28, 2024

A, C and D