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
Need the answer ASAP plz !!!!!
Evgesh-ka [11]
Performance would be the answer
3 0
3 years ago
___________ is a task pane used to correct grammar errors; opens when you click the Spelling & Grammar button in the Proofin
BaLLatris [955]

Answer:

Spelling Task Pane

Explanation:

According to my research on Microsoft Office Studio, I can say that based on the information provided within the question the feature being mentioned in the question is called the Spelling Task Pane. By selecting this pane word will offer various grammar and spelling assistance, such as correcting words and offering one or more suggestions.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Read 2 more answers
: how can you reduce file size so that files can be sent more efficiently across the internet
Rina8888 [55]
You can compress them. ZIP is the most well known protocol.
8 0
3 years ago
What is the difference between delete and backspace key?​
vladimir2022 [97]
They are the same thing
5 0
3 years ago
Read 2 more answers
How has the development of personal computer hardware and software reversed some of the trends brought on by the industrial revo
Nadya [2.5K]
<span>There should be no need to have white-collar employers just next to factories thanks to the Information Revolution, and it enabled executives to stay in home, write documents, and send them easily.</span>
4 0
3 years ago
Other questions:
  • Create a Python for loop script of exactly 2 lines of code that generates a sequence of integer numbers that start in zero and g
    12·1 answer
  • Hen using presentation software, what do you do when you "compose a slide"?
    5·1 answer
  • Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same back
    6·1 answer
  • Imported data that maintains a refreshable link to its external source is called ____ data.
    7·1 answer
  • Write a program that asks for the weight of a package and the distance it is to be shipped. This information should be passed to
    12·1 answer
  • Consider Statement 1: All prime numbers greater than 3 are equal to a multiple of six, plus 1 or minus 1. Let P(x) be the statem
    7·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
  • How can I call moderator in braily app ???
    5·1 answer
  • Sorry, I cant tell you, you need to know
    5·2 answers
  • Chantal has configured the network at her company's new headquarters with a number of VLANs. All devices joined to the individua
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!