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
What is a browser? Give one example
Harman [31]
It is a program that may be used by a user to access files and navigate the World Wide Web. An example of this would be Firefox, Chrome, Safari, etc.
3 0
2 years ago
Read 2 more answers
Mary is writing an article about the software development life cycle. She wants to place a flowchart besides the text. Which men
vichka [17]
The answer to this question is that Mary should choose insert image . Then, in the wrap text Mary should choose “top and bottom” to add it below the text she wrote. Using the option Top and bottom - text appears at the top and bottom of the image.
4 0
2 years ago
Read 2 more answers
Which type of communication protocol converts data into standard formats that can be used by applications?
larisa86 [58]
<span>Arrival protocols are the type of data protocols that convert data into standard formats that can be used by applications, such as email, Web browsers and Skype</span>
8 0
3 years ago
What is the difference between hardware and software?
DIA [1.3K]

Answer:

Computer hardware is any physical device used in or with your machine, whereas software is a collection of code installed onto your computer's hard drive. For example, the computer monitor you are using to read this text and the mouse you are using to navigate this web page are computer hardware.

Explanation:

4 0
3 years ago
Write a method max() which take a generic singly linked list as an argument and returns the maximum element reference in the lis
max2010maxim [7]

Answer:

See explaination

Explanation:

java code:

class DONALD

{

static class Node

{

int data;

Node next;

}

static Node head=null;

static int largestElement(Node head)

{

Int max=Integer.MIN_VALUE;

while(head!=null)

{

if(max<head.data)

max=head.data;

head=head.next;

}

return max;

}

static int smallestElement(Node head)

{

int min=Integer.MAX_VALUE;

while(head!=null)

{

if(min>head.data)

min=head.data;

head=head.next;

}

return min;

}

static void push(int data)

{

Node newNode=new Node();

newNode.data= data;

newNode.next=(head);

(head)=newNode;

}

static void printList(Node head)

{

while(head!=null)

{

System.out.println(head.data + " -> ");

head=head.next;

}

System.out.println("NULL");

}

public static void main(String[] args)

push(15);

push(14);

push(13);

push(22);

push(17);

System.out.println("Linked list is : ");

printList(head);

System.out.println("Maximum element in linked list: ");

System.out.println(largestelement(head));

System.out.print("Maximum element in Linked List: " );

System.out.print(smallestElement(head));

}

}

6 0
3 years ago
Other questions:
  • You wish to enter your exam scores in a spreadsheet. Which function will help you find how each subject’s score relates to the o
    8·1 answer
  • You can use the bash shell to redirect standard output or standard error from the terminal screen using the ____ shell metachara
    15·1 answer
  • Which of the following can be created when two tables contain a common field?
    14·1 answer
  • When designing your navigation, your primary objective should be to include keywords for search engines.
    6·1 answer
  • Edie wants to visit her university's website. What software application should she use?
    9·2 answers
  • Portable Document Format (PDF) is a file format that provides an electronic image of a document and can be viewed, printed, and
    12·2 answers
  • Which of the following scenarios is an example of irrelevant media?
    11·1 answer
  • Clarissa is a computer programming consultant. When a client states that they have an extremely complex programming task, which
    10·2 answers
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
  • in ____ structures, the computer repeats particular statements a certain number of times depending on some condition(s).
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!