Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

PCAP-31-03 - Module 1 - Modules, Packages & PIP UPDATED ACTUAL Exam Questions and CORRECT Answers

Document preview thumbnail
Preview 2 out of 12 pages

PCAP-31-03 - Module 1 - Modules, Packages & PIP UPDATED ACTUAL Exam Questions and CORRECT Answers Decomposition - CORRECT ANSWER manageable parts, using modules Module - CORRECT ANSWER breaking a large problem into smaller more a file containing python definitions and statements Module user - CORRECT ANSWER Module supplier - CORRECT ANSWER someone who uses an existing module someone who creates a brand new module

Content preview

PCAP-31-03 - Module 1 - Modules, Packages
& PIP UPDATED ACTUAL Exam
Questions and CORRECT Answers
Decomposition - CORRECT ANSWER breaking a large problem into smaller more
manageable parts, using modules


Module - CORRECT ANSWER a file containing python definitions and statements



Module user - CORRECT ANSWER someone who uses an existing module



Module supplier - CORRECT ANSWER someone who creates a brand new module



What a module can contain (5 entities) - CORRECT ANSWER functions, constants,
objects, variables, classes


Namespace - CORRECT ANSWER a space in which names exist, with no names that
conflict each other ( no duplicates )


What happens to the namespace when module is imported? - CORRECT ANSWER All
the names become known but need to be qualified to enter the codes namespace, so there can be
a variable such as randint without conflict


Qualify - CORRECT ANSWER name of module, followed by dot, followed by name of
entity.
for example... random.randint()


import module math - CORRECT ANSWER import math

, import module math as 'm' - CORRECT ANSWER import math as m



make all entities in math accessible without qualification - CORRECT ANSWER from
math import *


To make the entity sin accessible without qualification - CORRECT ANSWER from math
import sin


Import sin under the name 's', and pi under name 'p' - CORRECT ANSWER from math
import sin as s, pi as p


Make sin accessible without qualification, and import the rest of math - CORRECT
ANSWER from math import sin
import math


A name gets assigned that's already in the namespace - CORRECT ANSWER the original
name is overwritten


dir() - CORRECT ANSWER returns alphabetically a sorted list containing the names for
all teh entities


pow(X, Y) - CORRECT ANSWER returns value X to the power of Y



ceil(x) - CORRECT ANSWER smallest integer greater or equal to x



ceil(1.4) - CORRECT ANSWER 2



floor(x) - CORRECT ANSWER largest integer less than of equal to x

Document information

Uploaded on
July 11, 2025
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$12.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
18
Followers
1
Items
4642
Last sold
1 week ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions