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
#5 Multiple Select Which of the following describes a hardware error? Select 3 options.
DENIUS [597]

Answer:

A, E

Explanation:

Hope this is correct

7 0
3 years ago
Read 2 more answers
does an access control list looks for patterns of traffic between multiple packets and takes action to stop detected attacks?
Kryger [21]

The access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

<h3>What is the access control list?</h3>

An access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Based on the IP header data, such as the source or destination IP address, protocol, or socket number, an access control list filters traffic.

Thus, the access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Learn more about the access control list here:

brainly.com/question/13718195

#SPJ4

5 0
1 year ago
What does an industry expect of you as an employee?<br><br> At least 3 please!
Hatshy [7]
Trusting, loyal, and a hard worker. All indristies want employees who won't backstab, works hard, and is loyal to the company
7 0
3 years ago
Read 2 more answers
By default the Windows desktop displays programs, task bar and gadgets. T/F
pychu [463]
True, the Windows desktop displays task manager, all programs, computer status, documents...
3 0
3 years ago
Your database was damaged due to hardware failure. What can you use to restore it?
vesna_86 [32]
The only way is if you have backed up everything! Computers are amazing but they don't know that you need to back up your info. You should back up everything regularly! 
Hope this helped and have a nice day!

8 0
3 years ago
Other questions:
  • Persons who have been given access to an installation can be counted on to be of no threat. true or false? (antiterrorism scenar
    13·1 answer
  • Having a good credit score is important because:
    7·1 answer
  • to the nearest millimeter a cell phone is 123 long and 54 mm wide what is the ratio of width to length
    12·1 answer
  • Which feature enables you to make changes to all the slides of your presentation at the same time?
    15·2 answers
  • Samira works for a large U.S. company that has factories all over the world. Samira returned to the U.S. after visiting several
    9·1 answer
  • Selena needs to insert a comment in a webpage's code to ensure that other web team members who work with the page code understan
    15·1 answer
  • Which of these statements is true about database reports? A. A generated report will include all records in the database. B. A g
    10·1 answer
  • What does a spam e-mail normally promise you?
    9·1 answer
  • JAVA NEED HELP ASAP
    7·1 answer
  • Write a program that calculates the average of N integers. The program should prompt the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!