exam questions

Exam PT0-001 All Questions

View all questions & answers for the PT0-001 exam

Exam PT0-001 topic 1 question 48 discussion

Actual exam question from CompTIA's PT0-001
Question #: 48
Topic #: 1
[All PT0-001 Questions]

Given the following Python script:

Which of the following is where the output will go?

  • A. To the screen
  • B. To a network server
  • C. To a file
  • D. To /dev/null
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
mr_robot
Highly Voted 5 years, 2 months ago
Wrong paste. Definitely A. https://www.pythonforbeginners.com/code-snippets-source-code/port-scanner-in-python/
upvoted 23 times
...
D1960
Highly Voted 5 years, 2 months ago
Maybe: A. To the screen ? There is not file to print to. No file is opened, or closed.
upvoted 13 times
...
miabe
Most Recent 2 years, 11 months ago
Selected Answer: A
looks good to me
upvoted 1 times
...
cuernov
3 years, 1 month ago
Selected Answer: A
print to the terminal
upvoted 1 times
...
[Removed]
3 years, 2 months ago
Selected Answer: A
https://www.pythonforbeginners.com/code-snippets-source-code/port-scanner-in-python/
upvoted 1 times
...
cvMikazuki
3 years, 8 months ago
Ni A ni. Komfem. Cohort 1-2021
upvoted 1 times
...
Isuzu
3 years, 8 months ago
did anyone consider the 8th line: print '%d: OPEN' % (port)
upvoted 2 times
dumdada
3 years, 7 months ago
"%d" is a reference to variable "port". The result of this line would be, for example if port 443 is open: '443: OPEN'
upvoted 1 times
...
...
Cybersec1989
3 years, 8 months ago
Answer from D1960 A but not sure
upvoted 2 times
...
dp12
3 years, 11 months ago
Guys, this is screen. A is the answer here
upvoted 5 times
...
varo82
3 years, 12 months ago
A for sure it's a basic questions ... how is possibile that suggested answer was C ?!? Who checks the answer on this site?
upvoted 5 times
...
mr_robot
5 years, 2 months ago
Definitely C. https://www.pythonforbeginners.com/code-snippets-source-code/port-scanner-in-python/
upvoted 3 times
dyers
4 years, 1 month ago
Did you even read your own link, that page clearly shows output appearing on the screen.
upvoted 7 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 ...