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
In which conditions, a trial balance does not tally?
Nostrana [21]

Answer:

A trial balance will not balance if both sides do not equal, and the reason has to be explored and corrected.

Explanation:

The debit side and the credit side must balance, meaning the value of the debits should equal the value of the credit

4 0
2 years ago
using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 (or whatever) for you
mestny [16]

Answer:

Explanation:

The following code is written in Python. It creates a variable that detects the current time. Then it loops through a range of numbers and chooses the last random number after 2 seconds. Finally, it prints that number to the screen. This function can be called countless times depending on the number of state lottery numbers needed.

import random

import time

start_time = time.time()

while time.time() - start_time < 2:

   lottery_number = random.randint(0, 48)

print(lottery_number)

3 0
3 years ago
Common input devices include the keyboard, ____, and integrated video cameras.
Yuliya22 [10]
Common input devices include the keyboard, image scanner, and integrated video cameras. These also include the microphone, mouse, joystick controller, gamepad or joypad, webcam, digital pen, and others. Input devices are computer hardware used to control signals and provide data to a computer or an information appliance. 
4 0
2 years ago
Which of the following are actions a programmer could take when debugging a segment of code that would most likely lead to findi
Verizon [17]

Answer:

Option B and C are the correct answer for the above question

Explanation:

The above question asked about the work of the programmer to catch an error of the program--

  • Then the option B states that the programmer needs to prints the value of the various program variable on every line of the program which is the correct solution because it is used to find the error easily. It defines the value of every variable in every place of the program and the programmer caught the error statement in the program if anywhere the variable gets the false value.
  • The C option states to help from a friend, it is also a good solution because the friend can easily be caught the error of the program by seeing every line of code.
  • But the other option is not correct because the option A states that the change the name of the variable which is not a result of anything.
  • And the option D states that the code will be retyped again which is also not justify anything.

6 0
2 years ago
Write a program that converts degrees Fahrenheit to Celsius using the following formula. degreesC = 5(degreesF – 32)/9 Prompt th
weeeeeb [17]

Answer:

Written in Python

import math

degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))

degreesC = round(5 * (degreesF - 32)/9,1)

print(degreesC)

Explanation:

The following header allows you to use Math.Round() method in Python

import math

The following prompts the user for temperature in degrees Fahrenheit

degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))

The following calculates the degree Celsius equivalent and also round it up

degreesC = round(5 * (degreesF - 32)/9,1)

The following prints the degree Celsius equivalent

print(degreesC)

5 0
3 years ago
Other questions:
  • The ______ identifies the path for the currently open folder
    8·2 answers
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Which of the following is true about occupations within the STEM fields? Many occupations use mathematics, even if it is not the
    11·2 answers
  • NOTE: in mathematics, division by zero is undefined. So, in C , division by zero is always an error. Given a int variable named
    10·1 answer
  • ) How many switching functions of two variables (x and y) are there?
    11·1 answer
  • Which term refers to a type of an attack in which an attacker makes his data look like it is coming from a different source addr
    10·1 answer
  • During which phase of the website transformation processwould the project team for developing perform content analysis, layout t
    13·1 answer
  • a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?​
    10·1 answer
  • Data ____ refers to the accuracy of the data in a database
    9·1 answer
  • Primary functions of lighting are sufficient light to...
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!