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
Randy is concerned about his company’s data security on the Internet. Because cellular signals are not encrypted, he is concerne
vovikov84 [41]

Answer:

Randy should deploy SSH to allow the sales department to connect to the company network securely over cellular data signal.

Explanation:

Option A is the correct answer because SSH means Secure Shell. And Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Any network service can be secured with SSH

Option B is not correct because VPN mean virtual private network. And what VPN does is to extends a private network across a public network, and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

Option C is not correct because IMEI means International Mobile Equipment Identity and is a number that is use to uniquel identify 3GPP and iDEN mobile phones, as well as some satellite phones.

Option D is not correct because POP3 is an example of email protocol. Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails from a remote server to a local email client. POP3 allows you to download email messages on your local computer and read them even when you are offline.

4 0
2 years ago
The ____ class act as a switchboard between the view layer and the domain layer.
nadya68 [22]

The <u>control class</u> acts as a switchboard between the view layer and the domain layer.

Explanation:

As the name suggests, the control class is responsible for performing the control actions. The view layer defines the entities and attributes which have to be viewed and their structural organization.

The domain layer consists of all the entities, attributes, and relations in the data. The control class controls the flow of information between the two layers and performs the operations of filtering and selecting the content to be displayed.  

3 0
2 years ago
A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the sub
kykrilka [37]
What language are you programming in? 

<span>If you are programming in C or C++, you could do something like this: </span>

<span>#include <iostream> </span>
<span>using namespace std; </span>

<span>int main(void) </span>
<span>{ </span>
<span>//declarations </span>
<span>double item1 = 0; </span>
<span>double item2 = 0; </span>
<span>double item3 = 0; </span>
<span>double item4 = 0; </span>
<span>double item5 = 0; </span>
<span>double subtotal = 0; </span>
<span>double total = 0; </span>
<span>double tax = 0; </span>

<span>//Enter Items </span>
<span>cout << "Please enter the price of item 1"; </span>
<span>cin >> item1; </span>

<span>cout << "Please enter the price of item 2"; </span>
<span>cin >> item2; </span>

<span>cout << "Please enter the price of item 3"; </span>
<span>cin >> item3; </span>

<span>cout << "Please enter the price of item 4"; </span>
<span>cin >> item4; </span>


<span>cout << "Please enter the price of item 5"; </span>
<span>cin >> item5; </span>


<span>//Compute subtotal </span>
<span>subtotal = (item1 + item2 + item3 + item4 + item5 + item6); </span>

<span>//Compute amount of tax </span>

<span>tax = subtotal * (.06); </span>

<span>//Compute total </span>

<span>total = subtotal + tax; </span>

<span>//Display subtotal, total, and amount of tax </span>

<span>cout < " The subtotal of the sale is: " << subtotal << endl; </span>
<span>cout < " The amount of sales tax is: " << tax << endl; </span>
<span>cout < " The total of the sale is: " << total << endl; </span>

<span>return 0; </span>

<span>}//end of function main </span>


<span>I know this is a very very basic C++ program but I hope it helps and good luck on your project!</span>
5 0
3 years ago
Analyze the error in the html code :<br><br> HTML
Andrei [34K]

Answer:

The World Wide Web Consortium provide a simple online tool (https://validator.w3.org/) that automatically check your HTML code and point out any problems/errors your code might have, such as missing closing tags or missing quotes around attributes.

Explanation:

your question is not clear

hope it helps

6 0
3 years ago
PLEASE HELP!!!!!!!!!!
Shtirlitz [24]
<em>If i was answering this question I would pick D. Because a job is an organization of people working there and the people that work there have a strategic roll on the organization they work for because that's how they make their living!
</em>
7 0
3 years ago
Read 2 more answers
Other questions:
  • 3k means about 3 thousand bytes. how would you express two hundred million bytes?
    8·1 answer
  • What item on a business card is generally the most prominent?
    13·2 answers
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • Why are computer programs so much longer now than they were in the late 1980?
    8·1 answer
  • __________ has become a widely accepted evaluation standard for training and education related to the security of information sy
    5·1 answer
  • Declare a prototype for a function called isPrime that returns true or false and expects a single parameter named number of type
    14·1 answer
  • True or False
    11·1 answer
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • Which part of the brain controls the movement of muscles​
    6·1 answer
  • What is referential integrity
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!