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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
seaverick
2 months, 3 weeks ago
Selected Answer: B
s=open('module1.py','rt') c=s.read() print(c) Ans is B
upvoted 1 times
...
Amfortas
1 year, 7 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
1 year, 11 months ago
Selected Answer: B
B. the whole file content will be read and stored in the string called C
upvoted 3 times
...
Seb1988
2 years, 10 months ago
correct
upvoted 3 times
...
aykhazri
2 years, 11 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 ...