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
The graph shows that sixty-eight percent of students think cyberbullying is a problem. One hundred human stick figures are shown
kari74 [83]

Answer:

C.

More students are affected by cyberbullying than not affected.

Explanation:

I got it correct on Edgenuity 2020.

8 0
3 years ago
Read 2 more answers
9- Write a program in MARIE to add three numbers.
Korvikt [17]

A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

<h3>What is program?</h3>

Software, which also contains documentation and other intangible components, comprises computer programs as one of its components.

The source code of a computer program is the version that can be read by humans. Since computers can only run their native machine instructions, source code needs to be run by another software.

Using the language's compiler, source code may be converted to machine instructions. (An assembler is used to translate programs written in machine language.) An executable is the name of the generated file.

Therefore, A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

To learn more about program, refer to the link:

brainly.com/question/11023419

#SPJ1

8 0
11 months ago
Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product
Sphinxa [80]

Answer & Explanation:

1) Query:

SELECT Product_Name, Category_Name, List_Price

FROM Products AS P JOIN Categories AS C

ON C.Category_ID = P.Category_ID

ORDER BY Category_Name, Product_Name ASC;

2) Query:

SELECT C.Last_Name, C.First_Name, Order_Date, P.Product_Name, Item_Price, Discount_Amount, Quantity

FROM Customers AS C JOIN Orders AS O

ON C.Customer_ID = O.Customer_ID

JOIN Order_Items AS OI

ON O.Order_ID = OI.Order_ID

JOIN Products AS P

ON OI.Product_ID = P.Product_ID

ORDER BY Last_Name, Order_Date, Product_Name;

3) Query:

SELECT Category_Name, Product_ID

FROM Categories LEFT JOIN Products

ON Categories.Category_ID = Products.Category_ID

WHERE Product_ID IS NULL;

4) Query:

SELECT 'SHIPPED' AS Ship_Status, Order_Id, Order_Date

FROM Orders

WHERE Ship_Date IS NOT NULL

UNION

SELECT 'NOT SHIPPED' AS Ship_Status, Order_ID, Order_Date

FROM Orders

WHERE Ship_Date IS NULL

ORDER BY Order_Date;

3 0
3 years ago
Explain the reason why vector graphics are highly recommended for logo​
Verdich [7]

Answer:

Currently, raster (bitmap files) and vector graphics are used in web design. But if you want to make a great logo and fully enjoy the use of it you should pick vector graphics for it in the first place. And this is why most designers opt for it.

Explanation:

  • Easier to re-edit
  • No image distortion
  • It is perfect for detailed images
  • Vector drawings are scalable
  • Vector graphics look better in print
7 0
3 years ago
Assume that success is a variable of type boolean that has been declared. Assume that processor refers to an object that provide
Iteru [2.4K]
Try {
AutoFactory.shutdown();
} catch (ProductionInProgressException e) {
AutoFactory.reset();
}
6 0
3 years ago
Other questions:
  • What are pixels that are the exact same between multiple frames called?
    15·1 answer
  • Hanging out with friends, watching your favorite TV show, and buying a pair of new shoes are all examples of _____ for doing wel
    5·2 answers
  • what is the restaurant with the black pom tree and yellow backround three letter name from hi guess the restaurant
    14·2 answers
  • <img src="https://tex.z-dn.net/?f=3x%20-%205%20%3D%203x%20-%207" id="TexFormula1" title="3x - 5 = 3x - 7" alt="3x - 5 = 3x - 7"
    12·1 answer
  • Help me pleseeeeee i will mark u as brainliest
    10·1 answer
  • Pomógłbymi ktoś z takim zadaniem? C++
    8·1 answer
  • Given an array of integers and the size of the array, write a function findDuplicate which prints the duplicate element from the
    11·1 answer
  • Differentiate between trusted-source-security and antispoofing-security techniques.
    10·1 answer
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
  • What option would fit the most content on a page?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!