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
Answer for a, b, and c
Darya [45]

The answer is a. im pretty positive but if im wrong super sorry

5 0
3 years ago
What is the value stored at x, given the statements:
iren [92.7K]

Answer:

0.

Explanation:

Given

int x;

x=3/(int)(4.5+6.4)

Required

What is x?

The first line of the code segment declares x as integer. This means that, it will only hold non decimal numbers.

With the above explanation, options (a), (c) and (d) can not be true.

Solving further:

x=3/(int)(4.5+6.4)

The computer evaluates the denominator as:

x=3/(int)(10.9)

The denominator is then converted to an integer. So, we have:

x = 3/10;

3/10 = 0.3 but

Recall that: <em>x will only hold non decimal numbers.</em>

So:

x = 0;

5 0
3 years ago
why might you want to use the send to compressed (zipped) folder command before sending four pictures to a friend via email
IceJOKER [234]

It's easier to send the files that way because you don't have to attach them individually, and then your friend won't have to download them individually - they can just download the zip package and have all four right at their disposal.

6 0
3 years ago
Which file extension indicates the file is a Microsoft Word document?
Ivan

the answer to your question is ".docs"

3 0
3 years ago
A GPS _____. creates a technical drawing gives directions to a new location calculates the interest rate of a new car loan organ
aev [14]

gives directions to a new location

obviously

3 0
3 years ago
Other questions:
  • If a user wants to change one small section of the formatting of a document and leave the rest the same, which process should be
    14·1 answer
  • What is the output of the following Python program? try: fin = open('answer.txt') fin.write('Yes') except: print('No') print('Ma
    9·1 answer
  • Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
    7·1 answer
  • When using social​ media, make sure to provide access to all the information needed to accurately process messages by following
    6·1 answer
  • Multiple arrays. Jump to level 1 For any element in keysList with a value greater than 40, print the corresponding value in item
    7·2 answers
  • What defines which part of the IP address is the Network ID and the Host ID?
    5·2 answers
  • a blank search examines the first item to see if it is a match, then the second, and so on. answers: linear, binary, and orderly
    7·2 answers
  • After turning volume all the way up on your computer speaker you still can’t hear any sound. What should be done next
    15·1 answer
  • JAVA
    12·1 answer
  • What changes could you make so that a message, "User input deemed invalid." during designing a simple calculator program for you
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!