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]
2 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]2 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
Wich is the correct process for selecting an entire row in a spreadsheet?
umka21 [38]
CTRL - (select sentence) - ALT

4 0
2 years ago
A sample member of the list data is a1 = ['male', True] where the second item is True if the person is on the phone.
Ira Lisetskai [31]
Answer:

0

Explanation:
In the lists, indexation starts from 0, because of that in if statement we compare item[0] which is 'male' and 'male', and then males is itterated within for loop.
8 0
2 years ago
Read 2 more answers
Write a program to test your functions as follows: Obtain a random number seed from the command line of your program using comma
Iteru [2.4K]

Answer:

Please find the code attached.

Explanation:

Please find the attached code in pictures.

7 0
3 years ago
Implement the simulation of a biased 6-sided die which takes the values 1,2,3,4,5,6 with probabilities 1/8,1/12,1/8,1/12,1/12,1/
hjlf

Answer:

see explaination

Explanation:

import numpy as np

import matplotlib.pyplot as plt

a = [1, 2, 3, 4, 5, 6]

prob = [1.0/8.0, 1.0/12.0, 1.0/8.0, 1.0/12.0, 1.0/12.0, 1.0/2.0]

smls = 1000000

rolls = list(np.random.choice(a, smls, p=prob))

counts = [rolls.count(i) for i in a]

prob_exper = [float(counts[i])/1000000.0 for i in range(6)]

print("\nProbabilities from experiment : \n\n", prob_exper, end = "\n\n")

plt.hist(rolls)

plt.title("Histogram with counts")

plt.show()

check attachment output and histogram

4 0
2 years ago
What is the purpose of creating a primary key in a database
ss7ja [257]

Answer:

Basically it creates a unique identifier for each row in your table and that can help you link your table to other tables using primary key as link

Explanation:

"Primary key allows you to create a unique identifier for each row in your table. It is important because it helps you link your table to other tables (relationships) using primary key as links."

7 0
3 years ago
Other questions:
  • He smallest network is a ______________________, which is a network of personal devices, such as the network you use when you sy
    5·1 answer
  • What type of authentication does the dod require to access sensitive data on mobile devices and/or e-mail?
    9·1 answer
  • Please help will mark brainiest
    8·1 answer
  • Select one of the following strategies: active listening, sandwich technique, constructive feedback. in 2-5 paragraphs, define a
    11·1 answer
  • How to connect an Apple Watch series 3 to your iPhone (ASAP)
    6·2 answers
  • Hat are three machines or devices that depend on gravity to work?
    5·1 answer
  • Create a pseudocode program that asks students to enter a word. Call a function to compute the different ways in which the lette
    9·1 answer
  • If your internet were to go out, what steps would you take to troubleshoot to restore your service?
    15·1 answer
  • Which of the following is an advantage of text HTML editors over plain text editors?
    5·2 answers
  • Which attributes are indicators that a website is reliable? Check all that apply is up to date explains sources of data is an ed
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!