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
Roman55 [17]
3 years ago
10

Write a Scheme function called "sum" which takes an input function func and a nonnegative number n and outputs the value

Computers and Technology
1 answer:
solong [7]3 years ago
7 0

Answer:

function sum(number) {

      if (number == 1) {

             return 1;

      }

      return number + sum(number -1);

}

Explanation:

This is a recursive function, it means that is a function that calls itself for example: if you call the function with sum(5) the process is :

sum(5)

   |______ 5 + sum(4)

                           |_______ 4 + sum(3)

                                                       |______ 3 + sum(2)

                                                                                   |_____2 + sum(1)

                                                                                                        |_____ 1

                                                                                                 

the result is 1+2+3+4+5 = 15

You might be interested in
Elizabeth works for a local restaurant at the end of her shift she read she’s required to write in the time that she arrived in
gavmur [86]
B - because you should always be honest when it comes to working your hours and getting paid the right amount.
5 0
3 years ago
Malwar is the short form for malicious software and used to refer​
bearhunter [10]

Answer:

Malware is the shortened form of malicious software. Malware is an umbrella term used to refer to a variety of forms of hostile or intrusive software including Ransom wares, Computer Viruses, Worms, Trojan Horses, Spyware, Adware, Scareware etc.

7 0
3 years ago
A client-server relationship is the basic form of a ____?
adell [148]
<span>
A client-server relationship is the basic form of a computer network. 

-hope this helps.</span>
4 0
3 years ago
Where do you access the status report of an assigned task that is open?
Marina86 [1]

Answer:

I forgot give me time to think abt it cuh

Explanation:

4 0
3 years ago
Read 2 more answers
What is the name of the function below?<br><br> function go(){<br> alert("hello everybody");<br> }
labwork [276]

Answer:

It’s Java script I think and it makes something say hello everybody

Explanation:

6 0
3 years ago
Other questions:
  • • Describe the steps in detail that the operating system performs to handle interrupts, including ISRs, the stack, and hardware?
    5·1 answer
  • Which ergonomic principle helps to maintain good posture?
    7·2 answers
  • Python provides a special version of a decision structure known as the ________ statement, which makes the logic of the nested d
    13·1 answer
  • Pamela finds that she is constantly spelling the word “color” as “colour” when she is typing. Even though this is how the word i
    11·1 answer
  • Problem 5. (Greatest Common Divisor) Write a program gcd.py that accepts p (int) and q (int) as command-line arguments, and writ
    13·1 answer
  • Communication of a message between two processes implies which of the following? (A) Synchronization (B) Atomic operation (C) Bl
    11·1 answer
  • The purpose of multivariate analysis in index construction is to discover the simultaneous interaction of the items to determine
    12·1 answer
  • Write a HTML program as shown in the output.​
    9·1 answer
  • What are your strongest competencies? What will you do them? <br>❌NONSENSE ANSWER<br>​
    9·1 answer
  • Refers to the capacity to form bonds with particular
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!