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 71 discussion

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

If S is a stream open for reading, what do you expect from the following invocation?

  • A. one line of the file will be read and stored in the string called C
  • B. the whole file content will be read and stored in the string called C
  • C. one character will be read and stored in the string called C
  • D. one disk sector (512 bytes) will be read and stored in the string called C
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
seaverick
9 months, 4 weeks ago
Selected Answer: B
s=open('module1.py','rt') c=s.read() print(c) Ans is B
upvoted 1 times
...
Amfortas
2 years, 3 months ago
Selected Answer: B
...The read() method returns the specified number of bytes from the file. Default is -1 which means the whole file...
upvoted 1 times
...
macxsz
2 years, 6 months ago
Selected Answer: B
B. the whole file content will be read and stored in the string called C
upvoted 3 times
...
Seb1988
3 years, 5 months ago
correct
upvoted 3 times
...
aykhazri
3 years, 6 months ago
correct
upvoted 3 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 ...