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
Otrada [13]
3 years ago
5

What is the value of the variable result after these lines of code are executed?

Computers and Technology
2 answers:
notsponge [240]3 years ago
6 0

Answer:

5

Explanation:

Arada [10]3 years ago
6 0

Answer:

i guess it would be 5

Explanation:

You might be interested in
A ________ is s field or set of fields in a record that uniquely defines the record.
Archy [21]
A primary key is the answer. =)
5 0
3 years ago
What are the coordinates of the origin point? (Select the best answer.)
siniylev [52]

Answer:

1,10

Explanation:

7 0
3 years ago
On an ssd, a dashed arrow usually represents what?​
levacccp [35]
SSD stands for system sequence diagrams. SSd diagrams <span>model the interactions between objects in a single use case and illustrate how the different parts of a </span>system<span> interact with each other </span>
On an SSD, a dashed arrow usually represents an object. SSD <span>depicts the </span>objects<span> and classes involved in the scenario and the </span>sequence<span> of messages exchanged between the </span><span>objects.</span>
4 0
3 years ago
What is the line tool used for in photoshop
ale4655 [162]
Creates line<span> shapes and paths.</span>
5 0
3 years ago
A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
Reptile [31]

Answer:

  1. with(open("numbers.txt")) as file:
  2.    data = file.readlines()  
  3.    runsum = 0
  4.    largest = 0
  5.    
  6.    for x in data:
  7.        if(int(x) > largest):
  8.            largest = int(x)
  9.            runsum += largest  
  10.    
  11.    print(runsum)

Explanation:

The solution code is written in Python 3.

Firstly, open a filestream for numbers.txt (Line 1) and then use readlines method to get every row of data from the text files (Line 2).

Create a variable runsum to hold the running sum of number bigger than the maximum value read up to that iteration in a for loop (Line 3).

Use a for loop to traverse through the read data and then check if the current row of integer is bigger than the maximum value up to that point, set the current integer to largest variable and then add the largest to runsum (Line 6 - 9).

At last display the runsum to console terminal (Line 11).

8 0
3 years ago
Other questions:
  • After calling the customer service line of Delta airlines, Francis received an email asking her to fill out customer satisfactio
    9·1 answer
  • Mation about which osi layers of connected cisco devices can be verified with the show cdp neighbors comm
    15·1 answer
  • GAMES Which is better Roblox or BattleCamp Basically Free Points But Please Answer
    7·2 answers
  • ________ is installed into special, read-only memory of devices like printers and print servers or devices used for various type
    13·1 answer
  • Suppose that Alice wants to send Bob a 50 kilobyte message over a 1 Gbps link. The total time required to transmit the message (
    5·1 answer
  • OSHA standards appear in the ___________ and are then broken down into ____________.
    9·1 answer
  • What happens if the user sysadmin invokes the mail command interface and there are no unread mail messages?
    13·1 answer
  • Which of the following is part of the 6-by-6 rule?<br><br> i need help!!!!!
    5·1 answer
  • Help me please! (*18* points!)
    5·1 answer
  • List one unprofessional AND one professional example of internet/social media
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!