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
lord [1]
3 years ago
6

Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w

ith the corresponding number. Remember that the factorial of a number is defined as the product of an integer and all integers before it. For example, the factorial of five (5!) is equal to 1*2*3*4*5

Computers and Technology
1 answer:
nadezda [96]3 years ago
3 0

Answer:

Following are code of factorial in python language

def factorial(n): # function

   result=1 #variable

   for x in range(2,n+1): #iterating the loop

       result=result*x  #storing result

   return result #return result

for n in range(10): #iterating loop

   print(n,factorial(n)) #print factorial

Output:

Following are the attachment of output

Explanation:

Missing information :

In the question the information is missing the code is missing which we have to correct it following are the code that are mention below.

def factorial(n): # function

   result=1 #variable

   for x in range(       ): #iterating the loop

       result=  #storing result

   return  #return result

for n in range(  ): #iterating loop

   print(n,factorial(n)) #print factorial

Following are the description of code

  • We have create a function factorial  in this we have pass the one parameter i.e "n".
  • In the for loop we have pass 2,n+1 which has been used to iterating the loop calculating factorial and string the result in the result variable
  • In the main function we have pass the range on which we have to calculated the factorial
  • Finally the print function will print the factorial .

Following are the attachment snip of code in the python language

You might be interested in
What is the best response to cyberbullying?
astra-53 [7]
Answer is C





Braine list please:)
5 0
3 years ago
Read 2 more answers
Diane wants to maintain a record of grades she scored in the fifth, sixth, and seventh grades. She enters her grades and the tot
sammy [17]
The answer of the given question above would be the second option: NUMBERS. Based on the given scenario above about Diane who wants to maintain a record of grades she scored in the fifth, sixth, and seventh grades and enters  her grades and the total percentage she scored in a spreadsheet, the tab o<span>n the Format Cells dialog box that will enable her to display the total percentage symbol in the spreadsheet would be the Numbers. Hope this helps.</span>
6 0
3 years ago
Read 2 more answers
What is networking??????????????????????
kodGreya [7K]

Answer:

the activity or cycle of collaborating with others to trade data and create proficient or social contacts.

Explanation:

<3

8 0
3 years ago
What is the term for a program that performs a repetitive task on a network?
Andrews [41]
Bot. A program that performs a repetitive task on a network. Cybercriminals install malicous bots on unprotected computers to create a botnet. Zombie army. (also calledBotnet) groups of bots
7 0
3 years ago
You need to increase the security of your linux system by finding and closing open ports. which of the following commands should
spayn [35]
Netstat -pan | more


-----------------------------------------------------
5 0
3 years ago
Other questions:
  • John is analyzing strange behavior on computers in his network. He believes there is malware on the machines. The symptoms inclu
    5·1 answer
  • Which of the following is an important initial step in designing an interface
    7·1 answer
  • Ben chang noticed that his store was lagging in sales . He realized that his staff was not experienced enough . As the store man
    13·2 answers
  • Levi wants to run 5 commands sequentially, but does not want to create a shell script. He knows that each command is going to ta
    11·1 answer
  • What is the purpose of a mail merge field?
    12·2 answers
  • Ladders are a fundamental piece of equipment on construction sites and employers are expected to ensure that workers follow safe
    5·1 answer
  • JAVA
    12·1 answer
  • PLSSSSS HELPP!! Population biologists are concerned about invasive species such as the zebra mussel found in North American wate
    7·1 answer
  • Monero is cryptocurrency that focuses on transparency of ownership. True or false
    12·1 answer
  • Which type of network allows backups and network security to be centrally located?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!