1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VikaD [51]
3 years ago
14

The readline method reads text until an end of line symbol is encountered, how is an end of line character represented

Computers and Technology
1 answer:
zhannawk [14.2K]3 years ago
3 0

Answer:

\n

Explanation:

readline() method is used to read one line from a file. It returns that line from the file.    

This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.

So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.

For example if the file "abc.txt" contains the lines:

Welcome to abc file.

This file is for demonstrating how read line works.

Consider the following code:

f = open("abc.txt", "r")  #opens the file in read mode

print(f.readline()) # read one line from file and displays it

The output is:

Welcome to abc file.    

The readline() method reads one line and the print method displays that line.                        

You might be interested in
Is there a way to search your computer for all music files on it?
Slav-nsk [51]
Yes their is a way go to your downloads see if you have some thing or their shall be something that you can type in your computer and find something or you can go to Youtube or google and they can show you a video or some articles.
5 0
4 years ago
Someone help me I don’t know what to do /COMPUTER SCIENCE
nydimaria [60]
It kind of depends on the intended language, but I can see the following mistakes:

- lines not terminated with a semicolon (but not all languages require this)
- while statement missing parenthesis, ie., while (num1 <= num2), also not required in all languages
- statements below the while statement must be grouped by curly braces
- num1+5 should be num1=num1+5 or num1 += 5

Output will be:

10
15
20
25
30
5 0
4 years ago
Why do i keep losing points in brainly.com and how do you lose it?
kati45 [8]

Answer:

because you are asking questions like this

Explanation:

when you ask questions you lose points

6 0
3 years ago
Read 2 more answers
How do you print a document?
Monica [59]
Control + P (push these buttons at the same time)

or right click and print.

if you are printing a webpage, the steps are the same.

if you are using Word, then you just need to find the File tab and print should be in the list.
3 0
3 years ago
Two stations running TCP/IP are engaged in transferring a file. This file is 1000MB long, the payload size is 100 bytes, and the
weeeeeb [17]

Answer:

a. 2100

b. 2199

Explanation:

GIven that:

The file size = 1000 MB

The  payload size is  = 100 bytes

The negotiated window size is = 1000 bytes.

This implies that the sliding window can accommodate maximum number of 10 packets

The sender receives an ACK 1200 from the receiver.

Total byte of the file is :

1000 MB = 1024000000 bytes

a.

Sender receives an ACK 1200 from the receiver but still two packets are still unacknowledged

=1200 + 9 * 100

= 1200 +  900

= 2100

b. What is the last byte number that can be sent without an ACK being sent by the receiver?

b. Usually byte number starts from zero, in the first packet, the last byte will be 99 because it is in 1000th place.

Thus; the last byte number send is :

= 1200 + 10 *100 -1

= 1200 + 1000-1

= 1200 + 999

= 2199

6 0
4 years ago
Other questions:
  • Which of the following statements is true?
    14·1 answer
  • Suppose a developer gets class XYZ files and documentation from a subcontractor. This class does not implement the Comparable in
    9·1 answer
  • I need help <br> Match each words with its definition!!!<br> Please helpppppppp
    12·1 answer
  • A user on a home network needs to boost the signal of the wireless router. What should the user purchase to accomplish this?
    14·1 answer
  • Which command should you select to track changes in a document?
    9·2 answers
  • Using encryption, a sender can encrypt a message by translating it to which of the following?
    15·1 answer
  • Which technology has the potential to be misused to make atomic bombs? A. computer technology B. nuclear technology C. medical t
    14·1 answer
  • What is a compiler? O a tool used to integrate multiple software programs O a tool used to extract a single software program fro
    13·2 answers
  • What is an outcome in a game? Don't search google just give me an answer
    9·1 answer
  • Which of the following variables are string types?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!