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
RideAnS [48]
3 years ago
11

PLEASE HELP!! Computer science test

Computers and Technology
1 answer:
tatiyna3 years ago
6 0

Answer:

See Explanation

Explanation:

Given

The attached function

What the recursion does is that; it adds up individual digits from N to 0

Solving (a): Each output when N = 6

For N = 6.

The function returns the following values:

f(6) = 6

Then: 6 + f(5)

Then: 6 + 5 + f(4)

Then: 6 + 5 + 4 + f(3)

Then: 6 + 5 + 4 + 3 + f(2)

Then: 6 + 5 + 4 + 3 + 2 + f(1)

Then: 6 + 5 + 4 + 3 + 2 + 1 + f(0)

Then: 6 + 5 + 4 + 3 + 2 + 1 + 0 = 21

Solving (b): The output when N = 7

Using the same process in (a) above.

The output is 28

You might be interested in
Which statement below is true about how the functions of the digestive and circulatory system are connected.
telo118 [61]

Answer:

The digestive system breaks down the food into molecules that can be used by the cells. The circulatory system moves the molecules from the villi to all cells in the body.

8 0
3 years ago
A U.S. social security number consists of a string of 9 digits, such as "444422333". Assume that input consists of a sequence of
harkovskaia [24]

Answer:

767745089

Explanation:

6 0
3 years ago
Read 2 more answers
This list represents the horses leading in a race: leadHorses ← ["Justify", "Bravazo", "Good Magic", "Tenfold", "Lone Sailor", "
IrinaVladis [17]

Answer:

leadHorses ← ["Justify", "Bravazo", "Good Magic", "Lone Sailor", "Tenfold",  "Sporting Chance", "Diamond King", "Quip"]

Explanation:

leadHorses ← ["Justify", "Bravazo", "Good Magic", "Tenfold", "Lone Sailor", "Sporting Chance", "Diamond King", "Quip"]

tempHorse ← leadHorses[3]

tempHorse ← Tenfold

leadHorses[3] ← leadHorses[4]

leadHorses[3] ← Lone Sailor

leadHorses[4] ← tempHorse

leadHorses[4] ← Tenfold

leadHorses ← ["Justify", "Bravazo", "Good Magic", "Lone Sailor", "Tenfold",  "Sporting Chance", "Diamond King", "Quip"]

Tenfold and Lone Sailor swap positions.

5 0
3 years ago
How to open microsoft word
miss Akunina [59]

Answer:

In Windows 10 press the start button.

Then type <em><u>'Microsoft Word'.</u></em>

Next you will see an <u><em>Open</em></u> option, press that.

Now your <em><u>'Microsoft Word'</u></em> is ready.

Explanation:

4 0
3 years ago
Read 2 more answers
What is a characteristic ofa good cloud-based hosting?
Aliun [14]

Answer:

Explanation:

A good cloud-based hosting has many beneficial characteristics, some of which include on-demand self-service, broad network access, and being very elastic and scalable. These characteristics allow for a large number of users to benefit from the service at any time of the day and at a very fast speed due to the broad network access.

6 0
3 years ago
Other questions:
  • Identify the four basic categories of hardware in a microcomputer system. system unit, modem, ram, and microprocessor system uni
    5·1 answer
  • What type of power flaw involves a fluctuation in voltage levels caused by other devices on the network or by EMI?
    13·1 answer
  • Using your idea about how to solve this DUI problem, list two actions you can take that will make more people aware of this issu
    15·1 answer
  • UDP and TCP use 1s complement for their checksums. Suppose you have the following three 8-bit bytes: 01010011, 01100110, 0111010
    13·1 answer
  • You can easily view the ruler on a document by selecting the Show Ruler button located _____.
    11·2 answers
  • Mingji is working to transfer photos from her digital camera to her computer. While
    11·1 answer
  • What will be the output of the following code segment:
    12·1 answer
  • Which type of internet connection allows for high-speed bi-directional data communication over a hybrid fiber-coaxial (HFC) conn
    5·1 answer
  • When companies charge different prices for the same product, they're using
    12·1 answer
  • What type of trust model is used as the basis for most digital certificates used on the internet?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!