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
Doss [256]
3 years ago
13

What does the following loop do? val = 0 total = 0 while (val < 10): val = val + 1 total = total + val print( total)

Computers and Technology
1 answer:
Westkost [7]3 years ago
8 0

Answer:

print(total) => 45

Explanation:

# smells like Python...

val = 0 #initialize incrementor named 'val' at 0.

total = 0 #initilize accumulator named 'total' at 0.

while (val < 10): #look to execute while val is less than 10.

 val = val + 1 #increment val (val++) by 1

  total = total + val #increment total by val (val+=total)

# Step: val = 0

## val => 1, total => 1

# Step: val = 1

## val => 2, total => 3

# Step: val = 2

## val => 3, total => 5

# Step: val = 3

## val => 4, total => 9

# Step: val = 4

## val => 5, total => 14

# Step: val = 5

## val => 6, total => 20

# Step: val = 6

## val => 7, total => 27

# Step: val = 8

## val => 9, total => 36

# Step: val = 9

## val => 10 (END_LOOP), total =>  45

print(total) #print variable 'total'

You might be interested in
In linear programming a solution that does not simultaneously satisfy all constraints is called an
Eddi Din [679]
<span>When it comes to linear programming, the solution which would be effective in satisfying all constraints in the given program in a simultaneous matter is called that of feasible programming. This is due to the fact that the program can satisfy all requirements at the same time.</span>
3 0
4 years ago
What does the hard drive do
Gnoma [55]

The most important characteristic of a hard drive is how much data the hard drive can store, referred to as the storage capacity. A typical internal hard drive for a new desktop computer or laptop has a storage capacity of several hundred gigabytes

8 0
4 years ago
Read 2 more answers
Jennifer frequently uses a few programs on her laptop. Where will she find all the frequently used program icons in her computer
borishaifa [10]

Answer:

Jennifer can find the list of all the frequently used program icons on the left pane of the start menu. Below this list, still on the left pane, all programs installed on her computer will be listed in alphabetical order.

Explanation:

I hope this helps

7 0
4 years ago
Trent works as a correspondence clerk. Which technical skill is essential for him to perform his job?
anyanavicka [17]

Answer:

<em><u>keyboarding </u></em><em> </em><em>is</em><em> </em><em>essential</em><em> </em><em>for</em><em> </em><em>him</em><em> </em><em>to</em><em> </em><em>perform</em><em> </em><em>his</em><em> </em><em>job</em><em>.</em><em> </em>

4 0
3 years ago
Who invented the first antivirus software and when was it written?
Bad White [126]

Answer:

The answer to this question can be given as:

The first antivirus was written in 1987 by the German security expert Bernd and the name of the antivirus is Vienna Virus.  

Explanation:  

Antivirus: It is a software or anti-malware software that is used for providing security. It is a tool that runs on various digital devices and searches for files that should not be on your computer. If the file is found then It defends the computer from incoming threats and seeks-out, stops and alerts of viable threats from the system so the computer works properly. So, the first antivirus was developed in 1987 by German security expert Bernd.

7 0
3 years ago
Other questions:
  • 1. Which markup language adds the ability to use video without requiring the user to download add-ons?
    13·1 answer
  • When you use the Bing Image Search for online pictures, you will be searching the Internet for pictures that have been filtered
    13·2 answers
  • What is better apple or andriod
    11·2 answers
  • Why did Herman Hollerith invent the Tabulating Machine?
    10·1 answer
  • You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
    13·1 answer
  • In Windows, which menu allows you to view file characteristics?
    14·1 answer
  • Consider the following code: String word [] = {"algorithm", "boolean", "char", "double"}; for ( int i =0; i &lt; word.length/2;
    11·2 answers
  • Choose the answer that best completes the statement.
    7·2 answers
  • 10. What Microsoft program is frequently used to develop pictorial representations
    10·1 answer
  • Discuss the various types of keys available on a computer keyboard.<br>No spam answer needs!❌❌​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!