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
2 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
18 days ago
C) from pymod import pyvar pyvar ()
upvoted 0 times
...
Frederica
24 days ago
A) import pyvar from pymod pyvar = 1
upvoted 0 times
...
Geraldo
24 days ago
C) from pymod import pyvar pyvar ()
upvoted 0 times
...
Krissy
1 months ago
A) import pyvar from pymod pyvar = 1
upvoted 0 times
...
...
Hubert
2 months ago
B is just a mess. You can't assign a value like that in the import statement.
upvoted 0 times
...
Rikki
2 months ago
C is definitely wrong. You can't call a variable like a function.
upvoted 0 times
...
Sabra
2 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
18 days ago
User2: Oh, I see. Option C and D both seem like valid ways to access the variable.
upvoted 0 times
...
Ozell
1 months ago
User3: Option D is also correct because it imports the module and then assigns a value to the variable.
upvoted 0 times
...
Nina
1 months ago
User2: I think Option C is correct because it imports the variable and then accesses it.
upvoted 0 times
...
Goldie
2 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
2 months ago
User2: Yes, we need to import the module and then access the variable using the module name.
upvoted 0 times
...
Terina
2 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
3 months ago
I think the correct answers are A) and C)
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77