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
Basic python coding, What is the output of this program? Assume the user enters 2, 5, and 10.
r-ruslan [8.4K]

Answer:

17.0

Explanation:

after first loop numA = 0.0 + 2 = 2.0

after second loop numA = 2.0 + 5 = 7.0

after third loop numA = 7 + 10 = 17.0

8 0
3 years ago
Can somebody help me with this question?
Vaselesa [24]


Designers are also responsible for interactive designs where the content changes as it gets updated, as well as screen interfaces that help people navigate through a lot of information. Interaction design differentiates itself from other kinds of design by adding another consideration: responding to the actions of the viewer or user. Editorial design for web and mobile is the most tangible example, including websites and mobile apps for publication. Some digital design involves the presentation of rapidly changing streaming information, also known as data visualization, creating both interactive and non-interactive interfaces. Product design refers to the 

8 0
3 years ago
In the following cell, we've loaded the text of Pride and Prejudice by Jane Austen, split it into individual words, and stored t
Sever21 [200]

Answer:

Explanation:

Since the array is not provided, I created a Python function that takes in the array and loops through it counting all of the words that are longer than 5. Then it returns the variable longer_than_five. To test this function I created an array of words based on the synapse of Pride and Prejudice. The output can be seen in the attached picture below.

def countWords(p_and_p_words):

   longer_than_five = 0

   for word in p_and_p_words:

       if len(word) > 5:

           longer_than_five += 1

   return longer_than_five

7 0
3 years ago
5 potential Challenges of Collaborative Tools
Mice21 [21]

You have most probably used some variation of collaboration tools like Slack, Basecamp, and Trello at some office gig. Working within a few of these tools might sometimes have a lot of problems.

1. Forced collaboration on Employees.

Some companies may sometimes fail to notice that some employees do not want to constantly have real-time notifications popping up every minute. They may fail to recognize what is important and what is not and end up wasting money on these tools.

2. The roll-out

These tools might represent awesome business productivity growth but sadly, a huge portion of the employees will be like, what is this? If management decides to use collaboration tools, they should explain what they are and the purpose of using them.  

3. Lack of User Training.

Organizations that do not offer strong training programs for these tools can see problems arise very quickly. This could help gain insight on whether or not employees want to collaborate in the first place.

4. The “reduction in email” argument

People might positively accept these tools and become a bit connected. However, the downside to it is that, whenever something big is due, everyone falls back to email. Users need to seriously use these tools  across a variety of contexts.  

5. The overloading of documents and files.

If collaboration tools are rolled out for the sake of process documents and burdensome tracking sheets, people might head right back to their email and full meeting schedules and collaboration will die in the flood.  

5 0
3 years ago
Check out this app! It's millions of students helping each other get through their schoolwork. https://brainly.app.link/qpzV02Ma
MrRa [10]

Answer:

Tamam hocam o zaman....

8 0
2 years ago
Other questions:
  • Which of the following can you do under the fair use exceptions?
    6·1 answer
  • A technician is configuring a new SOHO multifunction wireless router at a customer's location to provide network access to sever
    7·1 answer
  • Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volu
    11·2 answers
  • The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.
    7·1 answer
  • This problem has been solved!
    8·1 answer
  • Only technical managers needs to know about programming, web view source code and about technology issues.
    12·1 answer
  • How do you hack a iPhone, Like If you forgot your password and want to get back in your phone. What do you do?
    7·2 answers
  • How many times is the body of the loop executed?
    8·1 answer
  • How can you distinguish between a manually added page break and an automatic page break in a worksheet?.
    6·1 answer
  • How to use boolean to check if math answer is correct java
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!