Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Python Institute Exam PCAP-31-03 Topic 3 Question 52 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 52
Topic #: 3
[All PCAP-31-03 Questions]

A Python module named pymod.py contains a variable named pyvar.

Which of the following snippets will let you access the variable? (Select two answers)

Show Suggested Answer Hide Answer
Suggested Answer: A, C

Contribute your Thoughts:

Cyndy
1 months ago
I wonder if the exam designers ever considered putting in a trick answer like 'import antigrav' just to see if anyone would fall for it.
upvoted 0 times
Lon
3 days ago
C) from pymod import pyvar pyvar ()
upvoted 0 times
...
Frederica
9 days ago
A) import pyvar from pymod pyvar = 1
upvoted 0 times
...
Geraldo
9 days ago
C) from pymod import pyvar pyvar ()
upvoted 0 times
...
Krissy
16 days ago
A) import pyvar from pymod pyvar = 1
upvoted 0 times
...
...
Hubert
1 months ago
B is just a mess. You can't assign a value like that in the import statement.
upvoted 0 times
...
Rikki
1 months ago
C is definitely wrong. You can't call a variable like a function.
upvoted 0 times
...
Sabra
1 months ago
I think Option A looks good too, but I'm not sure if that's the right way to assign a value to the variable.
upvoted 0 times
Rolf
3 days ago
User2: Oh, I see. Option C and D both seem like valid ways to access the variable.
upvoted 0 times
...
Ozell
20 days ago
User3: Option D is also correct because it imports the module and then assigns a value to the variable.
upvoted 0 times
...
Nina
21 days ago
User2: I think Option C is correct because it imports the variable and then accesses it.
upvoted 0 times
...
Goldie
1 months ago
User1: Option A is incorrect because the syntax is wrong.
upvoted 0 times
...
...
Vincenza
2 months ago
Option D is the correct answer. We need to import the module and then access the variable using the module name.
upvoted 0 times
Willow
1 months ago
User2: Yes, we need to import the module and then access the variable using the module name.
upvoted 0 times
...
Terina
1 months ago
User1: Option D is the correct answer.
upvoted 0 times
...
...
Leoma
2 months ago
I'm not sure, but I think A) and B) are the right choices
upvoted 0 times
...
Dorathy
2 months ago
I disagree, I believe the correct answers are B) and D)
upvoted 0 times
...
Elizabeth
2 months ago
I think the correct answers are A) and C)
upvoted 0 times
...

Save Cancel