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
ANTONII [103]
3 years ago
10

Create a recursive procedure named (accumulator oddsum next). The procedure will return the sum of the odd numbers entered from

the keyboard. The procedure will read a sequence of numbers from the keyboard, where parameter oddsum will keep track of the sum from the odd numbers entered so far and parameter next will (read) the next number from the keyboard.
Computers and Technology
1 answer:
maks197457 [2]3 years ago
8 0

Answer:

Explanation:

The following procedure is written in Python. It takes the next argument, checks if it is an odd number and if so it adds it to oddsum. Then it asks the user for a new number from the keyboard and calls the accumulator procedure/function again using that number. If any even number is passed the function terminates and returns the value of oddsum.

def accumulator(next, oddsum = 0):

   if (next % 2) != 0:

       oddsum += next

       newNext = int(input("Enter new number: "))

       return accumulator(newNext, oddsum)

   else:

       return oddsum

You might be interested in
Simplify the expresion<br>12. 12g + 9g​
Lerok [7]
12g + 9g simplified is 21g
7 0
3 years ago
Who is affected by electronuc theft of a song ?
Sonbull [250]
I would have to say the artist.
simply because the artist or publisher does not receive any income on their product. 
7 0
3 years ago
Read 2 more answers
The first step when entering data is _
34kurt

Answer:

click on the cell

Explanation:

This is a little tricky. We need to first think of the column, then of row, and then click on the corresponding cell. And then we either start typing or move our mouse to highlight the cells. Hence, the correct option here is click on the cell.

3 0
3 years ago
Which of the following is not a storage medium?
GarryVolchara [31]

Answer:

microphone

Explanation:

when you are using a microphone once it stop it done

8 0
3 years ago
Read 2 more answers
In a flow chart, both the decision structure and the repetition structure use the diamond symbol to represent the condition that
leonid [27]

Answer:

Option A(True) is the correct answer for the above question.

Explanation:

  • The flowchart is used to give the solution of a problem through the diagram in a step by step processor. It helps the user to understand the solution easily. For diagram, it uses many types of symbols that are fixed for every sequence just like An oval symbol represents the start and end of the flowchart which is fixed for every flowchart.
  • So for the decisions in a flowchart, the diamond symbol is used which is to make the decisions and it has two sides-- one is true and the other is false.
  • The decisions are used also to represent the loop structure which is also called the repetition structure because the loop is controlled by the help of decisions so the diamond box is also used for the loop
  • The above question-statement says that the decisions-controlled is used for the loop and for the decisions which are true because it is also described above.
8 0
3 years ago
Other questions:
  • The _____ command icon looks like a small clipboard with a page attached.
    6·1 answer
  • Ben's team is working on an English project. The members want to see everyone's progress on their part of the project. What tech
    7·2 answers
  • Which IEEE standards define Wi-Fi technology?
    10·1 answer
  • Choose the statement that describes an advantage of paying a bill through the mail with a check.
    6·2 answers
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • Analyze the following code:
    8·1 answer
  • Which of the following tools enables a production mixer to sync audio and video?
    7·1 answer
  • Electrical data suitable for transmission is called a(n)
    5·1 answer
  • which server edition doesn't support any server roles that you would typically use with standard version
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!