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
Alex leads a team of eight members. Arrange his tasks in sequential order of phases of group dynamics. What are the stages in gr
Alborosie

Answer and Explanation

There are five stages of group development which Alex should follow.

i) Stage 1: Forming-this is where he forms a team which will follow the other stages.

ii)Stage 2: Storming - In this stage is where the members set their goals and boundaries.

iii)Stage 3: Norming- This is where the team comes together in terms of ideas. In this stage members are ready to move forward with big expectations.

iv)Stage 4: Performing.-This is where  now the team is now accomplishing or implements their ideas and they are now getting the benefits.In this stage members argue positively.

v)Stage 5: Adjourning-This is the stage where the group has accomplished their mission.And now the group is dissolved

7 0
3 years ago
Characteristics of at-risk drivers
Firlakuza [10]
An at-risk driver is someone who is recklessly driving. an at-risk driver is a driver who is driving at a very high rate of speed. an at-risk driver is a driver who is someone who is driving in dangerous way as in no seatbelt or being distracted. 
4 0
3 years ago
Read 2 more answers
_____ is an instruction for a computer to perform a specific task.
alexandr402 [8]
A Command is an instruction for a computer to perform a specific task.
7 0
3 years ago
If you want to change the speed of a layer's horizontal scrolling, what should you change?
kirill [66]

Answer: A; X coefficient

Explanation: Hope I helped out !

-Carrie

Ps. it would mean a lot if you marked brainliest

6 0
3 years ago
What's a good online University to attended for cyber security certificate.?
IrinaK [193]

Answer:

If your in the UK, a great university to attend is Lancaster University for a cyber security certificate.

Explanation:

8 0
3 years ago
Other questions:
  • Store shelves are empty during periods of Excess Demand. What is another term for Excess Demand?
    8·1 answer
  • Which one is a correct answer
    12·2 answers
  • What is an optimal Huffman code for the following set of frequencies, based on the first 8 Fibonacci numbers?
    8·1 answer
  • I thought the answer was senior manager see on google it says
    8·1 answer
  • Which button should be utilized if a user is unsure whether or not they are the right person to reply to an email?
    6·2 answers
  • given:an int variable k,an int array currentMembers that has been declared and initialized,an int variable memberID that has bee
    5·1 answer
  • Explain the simliparities or difference between a workbook , worksheet and spread sheet​
    5·1 answer
  • What is required when opening a checking account?
    10·2 answers
  • D> Windows is the most popular for ​
    11·1 answer
  • The lost boy gave the correct
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!