answer.
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
Varvara68 [4.7K]
2 years ago
6

You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in

t types. What statement could you use to do this, assuming each line is represented by the line variable in a continuous loop?
Computers and Technology
1 answer:
baherus [9]2 years ago
7 0

Answer:

The answer to this question can be given as:

Statement:

number = int(line.strip())

Explanation:

In the above statement, we declare an integer variable number accept the integer value from the file that name is line. In this line, we use the strip() function. This function returns a duplicate string with both starting and tracking characters removed (based on the string parameter passed). The strip() function removes characters from both sides (left and right) based on the parameter(a string defining the collection of characters to be removed).

You might be interested in
Let's assume that the smallest possible message is 64 bytes (including the 33-byte overhead). if we use 100base-t, how long (in
Ostrovityanka [42]

As we know that 10-bAse data travels at the rate of 10 mbps, therefore at 1 sec we have 10240 bytes.

We have to calculate for 64 bytes travelling in one second. Multiply both sides by 64.

64 sec = 10240 x 64 bytes

64 bytes = 64 / 10240 sec

Now we have to calculate for light of speed

1 sec = 186000 miles

Substitute this value to the formula above

64 bytes = 64 / 10240 x 1 sec = 64 / 10240 x 186000 miles = 64 / 10240 x 186000 x 5280 feet = 6138x10^3 feet

Therefore, 64 bytes is equal to 6138 x 10^3 feet long message

3 0
2 years ago
Under what category of programs and apps do databases and enterprise computing fall?
Evgesh-ka [11]
Answer is productivity

Sometimes called the office or personal productivity software, productivity software is dedicated to producing databases, spreadsheets, charts, graphs, documents, graphs, digital video and worksheets. Reason behind the name productivity is due to the fact that it increases productivity in office work.

6 0
2 years ago
Assign max_sum with the greater of num_a and num_b, PLUS the greater of num_y and num_z. Use just one statement. Hint: Call find
Gnoma [55]

Answer:

def find_max(num_1, num_2):

   max_val = 0.0

   if (num_1 > num_2): # if num1 is greater than num2,

       max_val = num_1 # then num1 is the maxVal.

   else: # Otherwise,

       max_val = num_2 # num2 is the maxVal

   return max_val

max_sum = 0.0

num_a = float(input())

num_b = float(input())

num_y = float(input())

num_z = float(input())

max_sum = find_max(num_a, num_b) + find_max(num_y, num_z)

print('max_sum is:', max_sum)

Explanation:

I added the missing part. Also, you forgot the put parentheses. I highlighted all.

To find the max_sum, you need to call the find_max twice and sum the result of these. In the first call, use the parameters num_a and num_b (This will give you greater among them). In the second call, use the parameters num_y and num_z (This will again give you greater among them)

5 0
2 years ago
What protocol communicates data between routers representing the edges of autonomous systems?Distance-vectorLink stateInterior g
Nata [24]

Explanation:

Exterior gateway protocol are the routing protocols that are used on the internet for exchanging routing information among the autonomous system. These autonomous systems can be gateway protocol, vector routing protocol.

8 0
2 years ago
When using the Python shell and code block, what triggers the interpreter to begin evaluating a block of code
finlep [7]

Answer:

The answer is "A blank line".

Explanation:

The blank line initiates the interpreter to start examining the line of statements whenever the Python shell as well as the code block are used.  

  • It is also known as the line that has nothing but spaces or lines without texts or a line.  
  • It prints an empty sheet,  which leaves its performance with such a blank line.

5 0
2 years ago
Other questions:
  • What is a cursor?
    6·2 answers
  • Instructions:Type the correct answer in the box. Spell all words correctly.
    5·2 answers
  • ____ is a program placed on a computer without the user's knowledge that secretly collects information about the user
    14·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • if you had two proxy servers located in the same room, what use could you make of them? nothing create a hub sell one of the ser
    14·2 answers
  • A business wants to centralize its administrative tasks. At the same time, it wants the existing systems to manage and sustain t
    14·2 answers
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
    6·1 answer
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    13·1 answer
  • In a particular field, there are trees in a l single row from left to right. Each tree has a value V You cut trees from left to
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!