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
blondinia [14]
3 years ago
14

Add (total) all the number in the list (below) using a for loop, but skip over the number at index 3.

Computers and Technology
1 answer:
user100 [1]3 years ago
3 0

Answer:

The program in Python is as follows:

numbers = [10,20,30,40,50,60,100]

total = 0

for i in range(len(numbers)):

   if i != 3:

       total+=numbers[i]

print(total)

Explanation:

This initializes the list

numbers = [10,20,30,40,50,60,100]

Set total to 0

total = 0

This iterates through numbers

for i in range(len(numbers)):

This ensures that the index 3, are not added

<em>    if i != 3:</em>

<em>        total+=numbers[i]</em>

Print the calculated sum

print(total)

You might be interested in
Q.drtrdyudoijoemrkdf
sveta [45]

Answer:

Yes

Explanation:

8 0
2 years ago
Read 2 more answers
Which is an example of analog d<br><br><br>evice​
neonofarm [45]

Answer:

crt (cathode ray tube) vcr (video cassette recorder)

Explanation:

8 0
1 year ago
Write a program that declares and initializes a variable representing the weight in milligrams from the keyboard. The program di
Burka [1]

Answer:

weight = int(input("Enter weight in milligrams: "))

kilograms = int(weight / 1000000)

grams = int((weight - (kilograms * 1000000)) / 1000)

milligrams = weight - ((kilograms * 1000000) + (grams * 1000))

print("{} milligrams are equivalent to {} kilogram(s), {} gram(s), and {} milligram(s)".format(weight, kilograms, grams, milligrams))

Explanation:

*The code is in Python.

Ask the user to enter the weight and set it to the variable weight

Calculate the kilograms, divide the weight by 1000000 and cast the result to the int (If the weight is 1050042, kilograms would be 1050042/1000000 = 1)

Calculate the grams, subtract the kilograms from the weight, divide it by 1000 and cast the result to the int (If the weight is 1050042, grams would be int((1050042 - (1 * 1000000)) / 1000) = 50)

Calculate the milligrams, subtract the kilograms and grams from the weight (If the weight is 1050042, milligrams would be 1050042 - ((1 * 1000000) + (50 * 1000)) = 42)

Print the weight, kilograms, grams, and milligrams in the required format

3 0
2 years ago
The Matlab Script should:1. Clear the command window2. Clear the workspaceQuestion 1: Why do we clear the command window and wor
finlep [7]

Answer:

This is done for the simple reason of having more space to work on

Explanation:

This is done for the simple reason of having more space to work on. By clearing the command window and workspace you provide yourself with sufficient space to create new commands without the clutter of the previous commands. This also prevents your focus from shifting towards old commands and allows you to simply focus on the commands you are currently working on. This does not clear all variables from the script, it only clears the current screen but the previous commands can still be accessed by using the up-arrow key

5 0
2 years ago
To distinguish advertising, which typically is conveyed via print, TV, radio, the Internet, etc., from person-to-person forms of
neonofarm [45]

Answer: Mediated

Explanation:

 Mediated communication is the type of communication in which the information are carried out so that it can be used in various types of communication technology.

It is also known as mediated interaction and it can be used as face to face communication.

The mediated communication are typically used to distinguish the various form of communication. The mediated communication are not only computerized but also we can communication by using pen and paper.  

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is one problem you should keep in mind when researching information on the Internet?
    6·2 answers
  • Each computer or device on a network is called a(n) ______.
    7·1 answer
  • A parameter is a numerical measure that describes a characteristic of a sample. Choose One • 4 points True False
    6·1 answer
  • On a Windows network share, if the user can add, edit, and delete files and folders within the LabFiles folder, what type of acc
    14·1 answer
  • What are the defenses to protect against these attacks?
    13·1 answer
  • A good practice when using public domain content is to
    7·1 answer
  • Cuántos tipos de grua existen en el mundo​
    7·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • Design algorithm and the corresponding flow chart for adding the subject score of 5, total value and rank.​
    14·1 answer
  • If anyone knows how to code on python:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!