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
leva [86]
3 years ago
15

When a Python program is reading a file, the data is input as plain ASCII characters in a string. What is the following code doi

ng assuming a file is opened with file object inputFile? r_in = inputFile.readline() t = 0 while r_in != '': r = r_in.rstrip('\n') r_list = r.split('|') n = float(r_list[2]) t += n r_in = inputFile.readline()
Computers and Technology
1 answer:
Aleksandr [31]3 years ago
3 0

Answer:

The given python code mainly add values.

Explanation:

In the given python code, a r_in variable is defined, that reads a file in the next line, a while loop is declared, inside the loop "r_in" variable is used that provides slicing in the code.

  • In this code, in the file, each line is the format in field 1 and field 2.
  • The code puts its fields into the list first and then converts into the last dimension to the numerical type before applying to a sum.

You might be interested in
Argue whether we can infer anything about a candidate’s ability to work in a professional environment based on his or her resume
IceJOKER [234]

Answer:

when dressing feaded back is postive and then list areas of inprovmenr to met the job requirements

Explanation:

3 0
3 years ago
Software refers to:
aev [14]

Answer:

Software refers to the programs that run on your computer.

Explanation:

Examples are Word and PowerPoint. Computer programs contain instructions that the hardware carries out. ... Another program (called a compiler or interpreter) translates these instructions into machine language which the computer hardware understands.

7 0
2 years ago
Read 2 more answers
A popular game allows for in-app purchases to acquire extra lives in the game. When a player purchases the extra lives, the numb
Taya2010 [7]

Based on the fact that the hacker's actions are done before the application reading of the lives purchased, this is <u>d. Race condition. </u>

<h3>What is a race condition?</h3>

This is when certain processes in an application depend on the timing of a a previous process or event. The flow of information can then be intercepted before the process completes.

This is what the hacker did here by accessing the application to change the number of lives purchased before the application read the number of lives purchased.

In conclusion, option D is correct.

Find out more on the race condition at brainly.com/question/13445523.

4 0
2 years ago
ONCE AGAIN Can somebody explain the difficulties and hardships of being a computer engineering?
Lynna [10]

Answer:

The only thing I can think of, is stress. I cannot tell you how frustrating it is when you're writing code and it decides to bug out because of some little mistake. For hours you're writing and find out that you're missing a single ";" or an indent.

When you're writing out code in order to solve a problem, you need to break it down step by step in order to actually write it. Otherwise, you'll miss a bunch of steps

6 0
2 years ago
If the user loads this graphic in a text-only browser how will the browser describe it?
Dima020 [189]

Answer:

It will use the text in the ALT tag.

7 0
3 years ago
Other questions:
  • In Python please:
    15·1 answer
  • In 125 words describe the steps to active listening.
    6·1 answer
  • How do you change your age on here? I accidentally put that i was 15 but i am only 13. How do I change this?
    12·1 answer
  • What effect does screen resolution have on how graphics are displayed?
    7·1 answer
  • Which of the following is the correct ordering of operating systems, oldest to newest?
    5·2 answers
  • Which of these organs is not found in the excretory system
    7·2 answers
  • Assuming outFile is a file stream object and number is a variable, which statement writes the contents of number to the file ass
    13·1 answer
  • The Monte Carlo (MC) Method (Monte Carlo Simulation) was first published in 1949 by Nicholas Metropolis and Stanislaw Ulam in th
    14·1 answer
  • Suppose cell C5 contains the formula =B$6+C1.
    6·1 answer
  • 4.22 lab*: program: automobile service invoice(1) output a menu of automotive services and the corresponding cost of each servic
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!