Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 56 discussion

Actual exam question from Python Institute's PCAP
Question #: 56
Topic #: 1
[All PCAP Questions]

What should you put instead of XXX to print out the module name?

  • A. main
  • B. _main_
  • C. __main__
  • D. ___main___
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Reference:
https://www.geeksforgeeks.org/__name__-special-variable-python/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ciccio_benzina
2 years, 2 months ago
not = but ==
upvoted 2 times
baimus
1 year, 7 months ago
They have capitalised the If and put a space between ! and =, so I think they mean if __name__ !="__main__"
upvoted 1 times
...
...
macxsz
2 years, 7 months ago
Selected Answer: C
C. __main__
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...