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
ladessa [460]
2 years ago
13

Complete the function to return the factorial of the parameter using recursion.

Computers and Technology
1 answer:
Klio2033 [76]2 years ago
7 0

def recursiveFactorial(number):

   if number > 1:

       return number * recursiveFactorial(number-1)

   else:

       return 1

stringNum = input("Enter a positive integer: ")

num = int(stringNum)

print(recursiveFactorial(num))

You might be interested in
What is the best java 3d modeler library?
LenaWriter [7]
I believe its "Thinking Universe"
5 0
3 years ago
Which of the following statements isNOT true about abstract data types (ADTs)?A list is anexample of an ADT.ADTs hide theimpleme
Fynjy0 [20]

Answer:

Java provide all the ADTs you need,therefore you do not need to create any newones.

This statement is not true.

Explanation:

ADTs are those data types which we use but we didn't know their inner working that is how it is working what is happening inside.It is commonly used for Data Structures for example:- In stack we use push and pop operations to insert and to delete element from a stack respectively but we didn't know how it is happening inside.How the stack is implemented and etc.Java provides most of the ADT's but not all.

5 0
2 years ago
Ultimately, there exists a ceiling on efficiency because _______________.
earnstyle [38]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
Among the choices above the answer is C which is <span>of government taxation


To complete the sentece "</span>Ultimately, there exists a ceiling on efficiency because of government taxation
5 0
3 years ago
In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they w
Neporo4naja [7]

Answer:

def main():

   name = input("What is your name? ")

   if not name == "" or "":

       age = int(input("What is your age? "))

       print("Hello " + name + "! You were born in " + str(2021 - age))

main()

Explanation:

Self explanatory

5 0
2 years ago
Contrast the performance of the three techniques for allocating disk blocks (contiguous, linked, and indexed) for both sequentia
Pie
The allocation methods define how the files are stored in the disk blocks.
There are three main disk space or file allocation methods:
1.Contiguous Allocation-in this scheme,each file occupies a set of blocks on the disk. For example if a file requires x blocks and is given a block y as the starting location,then the blocks assigned to the file be :x,y+1,y+2,......y+x-1.
This means that given the starting block address and the length of the file(in terms of blocks required) we can determine the blocks occupied by the file.
Advantages
-both the sequential and direct accesses are supported
-this is extremely fast since the number of seeks are minimal because of contiguous allocation of file blocks.
2.linked allocation-in this scheme,each file linked list of disk blocks which need not  be contiguous disk blocks can be scattered anywhere on the disk.
Advantages
it is very flexible in terms of file size.file size can be increased easily since the system does not have to look for a contiguous chunk 
of memory.
this method does not suffer from external fragmentation and it makes it relatively better in terms of memory utilization.
3.Indexed Allocation-in this scheme,a special block known as the index block contains the pointers to all the blocks occupied by a file.Each file has its own index block.the entry in the index block contains the disk address of the block
Advantages
it supports direct access to the blocks occupied by the file and therefore provides fast access to the file blocks
it overcomes the problem of external fragmentation.
3 0
3 years ago
Read 2 more answers
Other questions:
  • How do computers find servers, requests information from the server, and receives it?
    12·1 answer
  • What is the purpose of a mail merge field.
    14·1 answer
  • Does anyone know any nitro type hack??
    13·2 answers
  • MICR is an input or output devices
    5·1 answer
  • Understanding the link between education and your desired career is an integral part of your career _______.
    7·2 answers
  • Coral Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the a
    6·1 answer
  • The goal of a system is to
    6·1 answer
  • The complete process for learning through repetition is to read, write, say, rest and revisit the information. Please select the
    12·2 answers
  • The sequence of instructions performed to execute one program instruction
    12·1 answer
  • Explain any two types of board band connection​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!