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
lana [24]
3 years ago
15

If you create and invoke a recursive function without accounting for a base case, what can go wrong?

Computers and Technology
1 answer:
oksian1 [2.3K]3 years ago
6 0

Every recursive function should have an exit criterion (=handling the base case) to exit the recursion.

Without it, it wil recurse forever, until system resources run out (typically the call stack will overflow and your program will crash).

You might be interested in
Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between
Cerrena [4.2K]

Answer:

see explaination

Explanation:

import random

def number_guess(num):

n = random.randint(1, 100)

if num < n:

print(num, "is too low. Random number was " + str(n) + ".")

elif num > n:

print(num, "is too high. Random number was " + str(n) + ".")

else:

print(num, "is correct!")

if __name__ == '__main__':

# Use the seed 900 to get the same pseudo random numbers every time

random.seed(900)

# Convert the string tokens into integers

user_input = input()

tokens = user_input.split()

for token in tokens:

num = int(token)

number_guess(num)

5 0
4 years ago
Which part of the computer contains logic circuity which interrupts instructions from a program​
poizon [28]

Answer:

The control unit of the CPU contains circuitry that uses electrical signals to direct the entire computer system to carry out stored program instructions.

Explanation: The control unit does not execute program instructions rather, it directs other parts of the system to do so.

6 0
3 years ago
A(n) _____ is a simple database program whose records have no relationship to one another.
almond37 [142]
"flat file"

A simple database program whose records have no relationship to one another<span>single</span>
7 0
4 years ago
Small-business owner Marcos set up his Google Ads campaign by thinking of “obvious” keywords off of the top of his head. What's
LiRa [457]

Answer:See the suggestions on the Opportunities tab

Explanation: The improvement in the Google ad can be made by the taking a look at the Opportunities tab which will display the adequate opportunities.

The tab displays these opportunities on the basis of the campaign settings, account's history, performance, style, trends etc and thus will create the appropriate opportunities accordingly.Thus Marcos will have to see the suggestion displayed on Opportunities tab

5 0
3 years ago
A method for selecting multiple lines of text is to _______. select one:
Aliun [14]
I would probably say B even though the other methods might work as well
5 0
3 years ago
Other questions:
  • Directions Use your imagination and a word processor to write a business letter with two to three paragraphs. Your business lett
    5·1 answer
  • Please look at picture
    10·2 answers
  • Which line is not a computer-generated forecast?Which line is not a computer-generated forecast?the black line representing 20th
    12·1 answer
  • When performing a basic search with Bing, you first type in your search expression and then click a button to begin the search;
    13·1 answer
  • Why is the len ( ) function useful when using a loop to iterate through a stack?
    6·1 answer
  • What is not true of credit scores?
    11·1 answer
  • A device that protects electronic equipment from an increase in power, but not a decrease or outage is a ___.
    12·1 answer
  • I need some help with this assignment. I'm having difficulty trying come up ideas to use here. Can I get any help?
    5·1 answer
  • Which factors are involved in search engine optimization​
    10·1 answer
  • Alexis plans to stop trading once she lose 5% of her account balance, her account balance is $215.00. How much money is she will
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!