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
tangare [24]
3 years ago
8

Lists and Procedures Pseudocode Practice For each situation, provide a pseudocoded algorithm that would accomplish the task. Mak

e sure to indent where appropriate. Situation A Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint: use Mod). Displays the sum. Situation B Write a procedure that takes
Computers and Technology
1 answer:
Andrei [34K]3 years ago
6 0

Answer:

The pseudocoded algorithm is as follows:

Procedure sumOdd(lotsOfNumbers):

    oddSum = 0

    len = length(lotsOfNumbers)

    for i = 0 to len - 1

         if lotsOfNumbers[i] Mod 2 != 0:

              OddSum = OddSum + lotsOfNumbers[i]

Print(OddSum)

Explanation:

This defines the procedure

Procedure sumOdd(lotsOfNumbers):

This initializes the oddSum to 0

    oddSum = 0

This calculates the length of the list

    len = length(lotsOfNumbers)

This iterates through the list

    for i = 0 to len-1

This checks if current list item is odd

         if lotsOfNumbers[i] Mod 2 != 0:

If yes, the number is added to OddSum

              OddSum = OddSum + lotsOfNumbers[i]

This prints the calculated sum

Print(OddSum)

You might be interested in
Which of the following domain types is most trustworthy 1) .com 2) .tv 3).org 4) .edu
yKpoI14uk [10]

Answer:

.edu

Explanation:

8 0
3 years ago
Read 2 more answers
What important practice can help prevent hardware trouble?
sleet_krkn [62]
<span>C. Maintenance is an important practice can help prevent hardware trouble. Maintenance involves operational and functional checks, servicing, repairing or replacing if necessary. Maintenance has two types which are </span>preventive or scheduled maintenance and corrective maintenance. Inspecting, maintaining and protecting a device, equipment or facilities before breaking down or other problems occur it is called preventive while corrective is when it is repaired or replaced after wear, malfunction or break down.

 

 


3 0
3 years ago
Question 4: What will be the output of the code? Show a complete analysis.
Eva8 [605]

Answer:

The output of the code is 8

4 0
3 years ago
If Word finds a potential error in a document, a red, green, or blue wavy underline flags the problem.
dlinn [17]
As for this problem of true or false, the most probable answer the most likely one to be the correct answer would be A. True.

In Microsoft Word, or commonly referred to as MS Word, or simply Word itself as what is utilized in the problem, the program has the ability to recognize in spelling and grammar. When a red wavy underline is present, the word or words above it are usually wrong in spelling. Though this can be corrected by the user by adding the word in the dictionary so as not to be corrected in the future. The green one would be more about grammar. The blue wavy underline would indicate a word spelled correctly, but might be misused in the sentence it belongs. This usually happens to words that are almost identical in spelling like too and to.
8 0
3 years ago
&gt;&gt;&gt; import math &gt;&gt;&gt; print(math.Pi) 3.141592653589793 &gt;&gt;&gt; def print_volume(): print ("What is the radi
kvasek [131]
I have no clue what this is asking...
8 0
3 years ago
Other questions:
  • Which organizational pattern would probably be most effective for arranging the main points of a speech with the specific purpos
    15·1 answer
  • ________ symbol is used in the "Advanced" section of the time range picker to round down to nearest unit of specified time.
    8·1 answer
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • You have a web application hosted in AWS cloud where the application logs are sent to Amazon CloudWatch. Lately, the web applica
    7·1 answer
  • Linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    14·1 answer
  • Which statement about the subject line is true? The subject line can be found just below the message box. The subject line is ma
    13·2 answers
  • Use the drop-down menus to describe how Adnan can add shapes to his presentation.
    11·1 answer
  • linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    5·1 answer
  • Can change the tab colors of the worksheets in excel
    13·1 answer
  • You want to be able to identify the services running on a set of servers on your network. Which tool would best give you the inf
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!