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
likoan [24]
3 years ago
15

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:
labwork [276]3 years ago
4 0

Program in Python

val = 0

total = 0

while (val < 10):

   val = val + 1

   total = total + val

print(total)

Answer:

Prints the sum of the numbers from 1 to 10.

Explanation:

Given

The above lines of code

Required

What does the loop do?

To know what the loop does, we need to analyze the program line by line

The next two lines initialize val and total to 0 respectively

<em>val = 0 </em>

<em>total = 0 </em>

The following iteration is repeated while val is less than 10

while (val < 10):

This increases val by 1

   val = val + 1

This adds val to total

   total = total + val

This prints the value of total

print(total)

Note that the loop will be repeated 10 times and in each loop, val is incremented by 1.

The values of val is 1 to 10.

The summation of these value is then saved in total and printed afterwards.

<em>Hence, the loop adds numbers from 1 to 10</em>

You might be interested in
You want to create a hyperlink within your document to the sec web site. which type of link do you create?
snow_lady [41]
An Existing file or web page. 
4 0
3 years ago
Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks thro
Scorpion4ik [409]

Answer:

Joe should read the explanatory text and complete the learning activities.

Explanation:

Given

See attachment for options

Required

Best strategy to get through the module

First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;

He may complete the activities but sure, he won't learn from the module.

Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.

The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).

4 0
2 years ago
Which orientation style has more height than width?
gayaneshka [121]

Answer:

"Portrait orientation" would be the correct answer.

Explanation:

  • The vertical picture, communication as well as gadget architecture would be considered as Portrait orientation. A webpage featuring portrait orientation seems to be usually larger than large containing lettering, memo abases as well as numerous types of content publications.
  • One such volume fraction also becomes perfect for impressionism depicting an individual from either the top.

Thus the above is the correct answer.

3 0
2 years ago
Match the column.<br> Description Shortcut key<br> Move to next cell in row page up
Musya8 [376]

The matchup are:

1) move to next cell in row - tab

2) move to previous cell in row - shift+tab

3) up one screen - page up

4) down one screen - page down

5) move to next worksheet - ctrl + page down

6) move to previous worksheet - ctrl + page up

7) go to first cell in data region - ctrl+ home

8) go to last cell in data region - ctrl + end

<h3>What are computer shortcut keys?</h3>

A computer shortcut is known to be some group of one or a lot of keys that brings about a command in software or in any kind of operating system.

Hence, The matchup are:

1) move to next cell in row - tab

2) move to previous cell in row - shift+tab

3) up one screen - page up

4) down one screen - page down

5) move to next worksheet - ctrl + page down

6) move to previous worksheet - ctrl + page up

7) go to first cell in data region - ctrl+ home

8) go to last cell in data region - ctrl + end

Learn more about computer shortcut from

brainly.com/question/12531147

#SPJ1

4 0
1 year ago
Which pair of properties apply to both sound and electromagnetic waves?
Alex73 [517]
Both waves can have interference, reflection, and diffraction.

Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.

Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.

Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
3 0
3 years ago
Read 2 more answers
Other questions:
  • What does CPL stand for
    9·2 answers
  • Which resource helps a user access a cloud service?
    8·1 answer
  • 1. Consider a direct-mapped cache that can accommodate 8Mbytes from a main memory, that uses a 32-bit address and 32-byte blocks
    5·1 answer
  • Why is it important to be part of a team in times you fail and in times you succeed?​
    15·1 answer
  • describe a situation in which peer pressure could cause a serious problem for safe driving, and how you could resist the peer pr
    8·2 answers
  • Which term collectively describes hard disks, CDs, and flash drives?
    11·2 answers
  • what is one example of the decomposers taking from the ecosystem and one of them giving to the ecosystem
    14·1 answer
  • Why is monitor called softcopy output device?​
    6·1 answer
  • A good machine should have the mechanical advantage of......?​
    7·1 answer
  • The coordinates for the section element need not be defined as long as its position is set to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!