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
Select the correct answer.
Vsevolod [243]

Philip is working with Adobe Photoshop to create some artwork for his college magazine. Which file format is he most likely to use with this
software?


C. JPEG
3 0
3 years ago
Which key removes all data from an active cell with one click
Aleks [24]
Hello,

Here is your answer:

The proper answer tot his question will be the "delete key"! This key allows you to delete all the data in a certain cell!

Your answer is delete!

If you need anymore help feel free to a ask me!

Hole this helps!

4 0
3 years ago
Read 2 more answers
A function is executed when it is
Alekssandra [29.7K]

Answer:

D. called

Explanation:

A function is executed when it is called.

Function definition comprises of the code body of the function.For example:

int add(int a, int b){

    return a+b;

}

Function declaration or function prototype specifies the signature of the function ( number and type of arguments, return type). e.g,

int add(int a,int b);

Function call is when the function is executed with actual arguments:

add(2,4);

This will return 6 upon execution of function body.

6 0
3 years ago
Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction stor
NISA [10]

Answer:

java

Explanation:

Java es rápido, seguro y fiable. Desde ordenadores portátiles hasta centros de datos, desde consolas para juegos hasta computadoras avanzadas, desde teléfonos móviles hasta Internet, Java está en todas partes. Si es ejecutado en una plataforma no tiene que ser recompilado para correr en otra. Java es, a partir de 2012, uno de los lenguajes de programación más populares en uso, particularmente para aplicaciones de cliente-servidor de web

6 0
2 years ago
Which of the following choices is not a viewing option?
malfutka [58]
B. FILE PAGES 
I answered wrong the first time, but according to an exam the answer is B. Definitely trust an exam answer! 
7 0
2 years ago
Other questions:
  • Typically, a CLEP exam is taken by students who
    8·1 answer
  • Guardrails are often used by employers to protect workers from falls. How high must the top guardrail be above the working surfa
    12·1 answer
  • You are attempting to gather information about a client's network, and are surveying a company site. Access is gained via secure
    8·1 answer
  • What is a Photojournalist
    5·1 answer
  • web pages within the same website often have different blank because they have different blank A) home pages, urls B) goals, sou
    12·1 answer
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    15·1 answer
  • What is computer graphics? define​
    11·1 answer
  • Read two numbers from user input. Then, print the sum of those numbers. Hint - Copy/paste the following code, then just type cod
    9·1 answer
  • Using pointers and shared memory for IPC, what would you need to add to your code to ensure data integrity?
    15·1 answer
  • We can create tables in MS. Word from *<br> 2 points<br> Insert Tab<br> Home Tab<br> Mailings Tab
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!