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
Suppose a byte-addressable computer using set-associative cache has 2 16 bytes of main memory and a cache size of 32 blocks and
melisa1 [442]

Answer:

Following are the responses to these question:

Explanation:

The cache size is 2n words whenever the address bit number is n then So, because cache size is 216 words, its number of address bits required for that  cache is 16 because the recollection is relational 2, there is 2 type for each set. Its cache has 32 blocks, so overall sets are as follows:

\text{Total Number of sets raluired}= \frac{\text{Number of blocks}}{Associativity}

                                               =\frac{32}{2}\\\\ =16\\\\= 2^4 \ sets

The set bits required also are 4. Therefore.

Every other block has 8 words, 23 words, so the field of the word requires 3 bits.

For both the tag field, the remaining portion bits are essential. The bytes in the tag field are calculated as follows:

Bits number in the field tag =Address Bits Total number-Set bits number number-Number of bits of words

=16-4-3

= 9 bit

The number of bits inside the individual fields is therefore as follows:

Tag field: 8 bits Tag field

Fieldset: 4 bits

Field Word:3 bits

3 0
3 years ago
Give at least 5 indicators which help to identify systems andtables as potential de-normalizationcandidates.
kondaur [170]

Answer and Explanation:

The five indicators are

  • There is existence of repeating groups which needs to be processed in a single group not individually
  • many reports exist which need to be processed online
  • tables need to processed in different way by different users at the same time
  • certain columns need very large time for the de normalization take 60% as the alarming number
  • many calculations needs to be applied to columns  before queries can be answered

8 0
3 years ago
Philip is thinking about customizing his motorcycle. A paint job, saddlebags, and a radio would cost $600. His motorcycle is old
Vikki [24]

Answer:

He will temporarily have less money in his bank account is the correct answer.

Explanation:

Philip is considering customizing his motorcycle. A saddlebags, a paint job, and a radio will cost $600. His motorcycle is vintage, so he already realized maybe sometime in the past two years he would required to get any other bike. To analyze the options, he builds a cost-benefit analysis table. He considers this, he might have less funds at that moment in his banking account.

7 0
4 years ago
Examine the exhibit above. Host B is sending an email intended for the user on Host A to the email server. What protocol is bein
Zolol [24]

Answer:

The correct answer to the following question will be "SMTP".

Explanation:

SMTP is indeed an encrypted communications-transmission interaction protocol.

  • It's also a pushing protocol that is used to deliver the package, while POP as well as IMAP is used to recover certain mails on the hand of the recipient.
  • Using this protocol, the messages or text is sent via the router.

So, it's the right answer.

8 0
4 years ago
Something that requests data from a server is known as a ____.
rosijanka [135]

Answer:

It is  called a client.

Explanation:

Any entity that request data from a centralized node in a network (which is called a server, because once received a request, it replies sending the requested piece of data back to the requester) is called a client.

The server can adopt different names based on its role: It can be a file server, an application server, a web server, a mail server etc.

This sharing information paradigm, where the resources are located in one host (server) to be distributed to many hosts (clients)  is called client-server model.

3 0
3 years ago
Other questions:
  • Write a C++ program that searches for anagrams in a dictionary. An anagram is a word obtained by scrambling the letters of some
    5·1 answer
  • 5. How can a budget prepare you to become financially secure?
    10·2 answers
  • The program needs a Frisbee Golfer class.
    15·1 answer
  • Your traffic light changes to yellow as you approach an intersection. In most cases, what action should you take?
    15·2 answers
  • Top Down Design makes it easier to solve a problem by:___________
    10·1 answer
  • There are over 150 free themes on Wordpress.com. Which of the following is a common feature for which you can filter your theme
    15·1 answer
  • All presentations should have this. A. a clear central message. B. a design template. C. at least seven slides. D. special effec
    10·2 answers
  • To obtain the desired speedup, make sure your new function recursively calls itself no more than once in the body of the method.
    8·1 answer
  • What do you setup when you want to filter traffic from getting through a firewall?
    13·1 answer
  • What does c++ programming mean?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!