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
Raman will perform in pune tomorrow(simple past)​
Ilya [14]

Answer:

Raman performed in Pune yesterday

6 0
3 years ago
Read 2 more answers
In which type of network will a problem with one computer crash the network?
3241004551 [841]

It is easy to troubleshoot problems, Nodes can be added without disrupting the network, The malfunction of one workstation doesn't crash the network.

7 0
3 years ago
Someone posing as an IT tech requests information about your computer configuration. What kind of attack is this
ra1l [238]

Answer:

Phishing

Explanation:

Phishing is one of the most common social engineering attacks in which the attacker disguises to be a trustworthy personnel in order to lure the victim or target into disclosing sensitive information such as passwords, credit card details and so on.

Phishing could be carried out via emails, telephones, or even text messages.

In this case, the attacker pretends to be an IT tech in order to get your computer configuration details which he can then use to carry out some other fraudulent acts.

Another example is in the case of someone receiving an email from their bank requesting that they need to update their records and need the person's password or credit card PIN.

8 0
4 years ago
A(n) ____ is a client, server, or other device that can communicate over a network and is identified by a unique number, known a
Elden [556K]

Answer:

The answer is "node".

Explanation:

The network address is known as a logical or physical address, which defines a networking module/device from a network. It is an allocated numerical number, to every device requiring access to the list or is a member of it.

  • In network communication, it uses the nodes for store data, and there address, these addresses are described by the unique numbers.
  • These node stores data packets, which stores encrypted data.  
7 0
4 years ago
Module 1 and 2 Coding Guided Notes Fill in your answers to each response as you read through the lesson pages in the coding cour
creativ13 [48]

Answer:

Code; code; program.

Explanation:

1. Instructions for computers to solve a problem is known as code. Computer code is how humans and machines talk to each other. Some examples of programming language used to write a code in instructing a computer for the execution of a task are python, Java, Javascript, ruby, c++, c# etc.

2. Learning to code or write a program allows for a solution to a problem.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • Binary data is written in hexadecimal. For example, when creating a graphic for a website, colors are represented by six hexadec
    12·1 answer
  • Graded Assignments may be found at the end of each chapter of the required textbook under the title "Real-World Exercises". Each
    15·1 answer
  • Suppose Alice, Bob, and Carol want to use secret key technology to authenticate each other. If they all used the same secret key
    10·1 answer
  • Can some one help me answer this question plz
    8·1 answer
  • Explain any one method of creating a presentation.
    10·1 answer
  • Which term means the push that makes electrons move in a wire?
    13·2 answers
  • Where are my files shortcut in documents folder.
    14·1 answer
  • Why are digital signals an accurate and reliable way to record and send information?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!