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]
2 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]2 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
Suppose we wanted to make change for purchases and wanted to use the least number of coins possible. Here is a greedy algorithm:
love history [14]

Answer:

Explanation:

The following code is a Python function that takes in the amount of change. Then it uses division and the modulo operator to calculate the number of coins that make up the changes, using the greatest coin values first.

import math

def amountOfCoins(change):

   print("Change: " + str(change))

   quarters = math.floor(change / 0.25)

   change = change % 0.25

   dimes = math.floor(change / 0.20)

   change = change % 0.20

   pennies = math.floor(change / 0.01)

   print("Quarters: " + str(quarters) + "\nDimes: " + str(dimes) + "\nPennies: " + str(pennies))

5 0
3 years ago
The source Host A is going to send 5KB (5120byte) of data to the destination Host B over an established TCP connection, which ha
NISA [10]

Answer:

the answer is d have a nice day

Explanation: i got a 100

3 0
2 years ago
Help help help help help help
Shkiper50 [21]

Answer:

maybe overexposure???

Explanation:

6 0
2 years ago
In a print statement, you can set the __________ argument to a space or empty string to stop the output from advancing to a new
jeka94

In a print statement, you can set the End argument to a space or empty string to stop the output from advancing to a new line.

<h3>What is a Print statement?</h3>

A print "statement" is known to be a kind of statement that looks like a call to the make (print) or println process of the System.

Note that In a print statement, you can set the End argument to a space or empty string to stop the output from advancing to a new line so that it can work properly.

Learn more about  print statement from

brainly.com/question/25220385

#SJ1

6 0
2 years ago
Hich chip contains the information necessary to start the computer system?
Sindrei [870]
The BIOS contains the information.
7 0
3 years ago
Other questions:
  • Consider that a large online company that provides a widely used search engine, social network, and/or news service is consideri
    12·1 answer
  • The underline format will underline ____.
    14·1 answer
  • What does limited access to a document mean?
    14·2 answers
  • How to upgrade from office home to office professional
    13·1 answer
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    11·1 answer
  • Suppose there are two links between a source and a destination. The first link has transmission rate 100 Mbps and the second lin
    12·1 answer
  • 5. ADD A STATEMENT OR STATEMENTS to the program on the following page (including constant and/or variable declarations if you wa
    6·1 answer
  • Write a Java program that launches 1000 threads. Each thread adds 1 to a variable sum that initially is 0. You need to pass sum
    11·1 answer
  • What is computer give definition ​
    14·2 answers
  • Identify the network and the host address in the ip address of 12.128.120.131 with a subnet mask of 255.128.0.0.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!