Describe what this function does. Try different numbers as input.

```
def test(num):
if num > 0:
return num – test(num-1)
else:
return 0
```


This method recursively calls itself with a decremented number, and subtracts that call from that number each time. This has an interesting effect, displayed in the examples below:

```
test(1) = 1
test(2) = 2-test(1) = 1
test(3) = 3-test(2) = 2
test(4) = 4-test(3) = 2
test(5) = 5-(test4) = 3

```

Computer Science & Information Technology

You might also like to view...

What is your terminal type set to? What command did you use to get your answer?

What will be an ideal response?

Computer Science & Information Technology

Name the organizational structure being used on each of the following Web pages.

a.









b.









c.









d.









e.




Computer Science & Information Technology

________ is a free presentation tool that you can use to create and share interactive reports and presentations

A) Microsoft Sway B) Microsoft Azure C) Microsoft SharePoint D) Microsoft Account

Computer Science & Information Technology

The ____ is located to the right of the navigation buttons and is used to locate a specific record in a form.

A. Record number B. Search box C. Find box D. Locate box

Computer Science & Information Technology