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
bogdanovich [222]
3 years ago
5

Implement a recursive program that takes in a number and finds the square of that number through addition. For example if the nu

mber 3 is entered, you would add 3+3+3=9. If 4 is entered you would add 4+4+4+4=16. This program must be implemented using recursion to add the numbers together. mips

Computers and Technology
1 answer:
lubasha [3.4K]3 years ago
3 0

Answer:

def recurSquare(n):

   if n == 0:

       return 0

   return recurSquare(n-1) + n + n-1

print(recurSquare(2))

Explanation:

Programming language used is Python.

The recursive function is defined as  recurSquare(n)

The IF statement checks the argument that is passed to the function to ensure it is not equal to zero.

The function is a recursive function, which means it calls itself.

In the return statement the function calls itself and the argument is reduced by 1.

The function keeps calling itself until n is equal to zero (n == 0) it returns zero and the function stops.

You might be interested in
Which statement uses the example type of context clue for the underlined word?
Usimov [2.4K]
I think the answer is C
8 0
2 years ago
Read 2 more answers
How can you stretch or skew an object in paint
Marat540 [252]

Here's link to the answer:

tinyurl.com/wpazsebu

3 0
3 years ago
Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not
LiRa [457]

Answer:

Items placed in a Web store's shopping cart for future purchase during the anonymous browsing session will not be saved on the user's computer

Explanation:

Browsing ananymously implemented as In-private browsing by some web browsers allows you to browse without leaving histories and cookies, however your activities can still be monitored by an admin and you are not protected from malware because of in-private browsing.  Because browsing histories are not saved, any data from a web store such as future purchase intention will also not be saved

7 0
3 years ago
Write a technical term for following statements
gizmo_the_mogwai [7]

Answer:

1. Hardware Maintenance

2. Uninterrupted Power Supply (UPS)

3. Antivirus software

Explanation:

Antivirus software, or Anti-virus software (also known as AV software), otherwise called anti malware, is a PC program used to forestall, distinguish, and eliminate malware.

Antivirus software was initially evolved to identify and eliminate PC infections, thus the name. Be that as it may, with the expansion of different sorts of malware, antivirus software began to give security from other PC dangers. Specifically, current antivirus software can shield clients from: noxious program criminals.

A few items additionally incorporate security from other PC dangers, for example, tainted and noxious URLs, spam, trick and phishing assaults, online identity (privacy), web based financial assaults, social engineering techniques, advanced persistent threat (APT).

3 0
3 years ago
What is meant by byte in computer terminology​
dsp73

Answer:

Byte, the basic unit of information in computer storage and processing. A byte consists of 8 adjacent binary digits (bits), each of which consists of a 0 or 1. The string of bits making up a byte is processed as a unit by a computer; bytes are the smallest operable units of storage in computer technology.

Explanation:

Can I be brainliest? TYSMMMMMM      

7 0
3 years ago
Read 2 more answers
Other questions:
  • In dt.py, you will implement a basic decision tree classifier for
    5·1 answer
  • Kim is creating a one-page presentation in Word about her parents’ home country, Vietnam. She has inserted images that are each
    7·2 answers
  • Write a program that accepts three decimal numbers as input and outputs their sums?​
    5·1 answer
  • To what extent can u justify that computer is not the only ICT tool?​
    9·1 answer
  • What is after Windows 8.1
    11·2 answers
  • In a registration database, Ross has tables for student, professor, classroom, class, class-hour. Since his campus has about 12,
    9·1 answer
  • In determining where to store specific data in a(n) centralized DBMS, factors such as communications cost, response time, storag
    12·1 answer
  • Sharon must give an informative presentation to a group of teenagers about cultivating earthworms for use in home gardening. Whi
    11·2 answers
  • PLS HELP SOON
    15·1 answer
  • What are two differences between a wide angle lens and a telephoto lens?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!