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
What would happen to a eukaryotic cell if all its mitochondriawere destroyed
julsineya [31]
The cell won't reproduce ATP.
4 0
2 years ago
Hw to gain more knowledge ​
LenaWriter [7]

Answer:

Read Books, Search the Internet, etc...

Explanation:

6 0
3 years ago
A programmer has an idea to use just one language for the content, structure, and style of web pages. What might be a problem wi
Juliette [100K]
Doesn’t give the programmer a lot of freedom to be creative. Using only one language on the web limits the amount features the programmer could create.

For example, just only using HTML limits the web page’s features to use scripts like Javascripts.
8 0
2 years ago
Ok so I usually don’t do this but I just need an answer , on Instagram a notification popped up while I was watching someone’s s
statuscvo [17]

Answer:

I think it was about cheaper ads on Instagram and how they are lowering their prices.

Explanation:

6 0
2 years ago
Read 2 more answers
Now you are ready to implement a spell checker by using or quadratic. Given a document, your program should output all of the co
Harlamova29_29 [7]

Answer:

Sorry po idont know po ehhh sorry

5 0
2 years ago
Other questions:
  • You are tasked with setting up an employee’s computer.Instead of a new computer,she will be using a computer with an older opera
    11·2 answers
  • How are the internet and the World Wide Web different from each other
    14·1 answer
  • A_____refers to the entire Excel file
    14·1 answer
  • Yolanda lost her left foot during her military service, but she has been issued a prosthetic that enables her to walk normally,
    13·1 answer
  • Badin Industries runs a web application that processes e-commerce orders and handles credit card transactions. As such, it is su
    9·2 answers
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • The advancement in speed of transportation is attributed to invention of this device
    8·1 answer
  • In which drawer can you set certain lights to light up on your micro:bit?
    12·2 answers
  • How do I indent the 1. bullet so it is not lined up with the regular bullet above it?
    9·1 answer
  • Need the answer ASAP!!!!!!!!!!!!! I’ll mark brainliest if correct
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!