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
ElenaW [278]
3 years ago
11

Write a Python function that takes a positive integer N and returns the factorial of N, i.e., N! The factorial of N, denoted N!,

is the product of the integers from 1 to N. (1 Point)
Computers and Technology
1 answer:
sesenic [268]3 years ago
6 0

Answer:

The python function is as follows:

def fact(N):

   factorial = 1

   for i in range(1,N+1):

       factorial = factorial * i

   return(factorial)

Explanation:

This line defines the function

def fact(N):

This line initializes the product of 1 to N to 1

   factorial = 1

This line iterates through 1 to N

   for i in range(1,N+1):

This line calculates the product of 1 to N i.e. factorial

       factorial = factorial * i

This line returns the factorial

   return(factorial)

You might be interested in
 A number of companies and/or agencies, such as National ____ and Atmospheric Administrationâs National Weather Service, provid
LekaFEV [45]

Answer: D) Oceanic

Explanation:

National oceanic and the atmospheric administration (NOAA)are the national weather services which basically provide the weathering conditions and forecast them on their particular websites.

NOAA is basically responsible for monitoring or environment and climate. this agency is situated in the united state at washington headquarter. It also helps to preserve the climate by taking some effective steps for our environment.  

4 0
4 years ago
What are horizontal and vertical page break? how and where are these inserted?​
Elena L [17]

A. Do this. horizontal page breaks. select the row that is underneath the row where you want the page to break vertical page break....

B. on the layout lab, under page set up, click breaks, and then click insert page break.

Explanation:

DO ONE OF THE FOLLOWING: TO INSERT

4 0
4 years ago
The program that is BEST suited
Troyanec [42]

Answer:

everything

Explanation:

cuz I use everything and they all work good

6 0
3 years ago
I need ur oppinion about this paragraph.
choli [55]

I think that this answer is amazing and nothing really needs to be added. Well Done!

5 0
3 years ago
Read 2 more answers
Could you help be advanced in tech?
Amiraneli [1.4K]
Yes I can help you if you go to google or bing type In the question you have and click enter you will get the answer

P.S if it doesn't try to type it more clear
6 0
3 years ago
Other questions:
  • Java languageThe cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.1. Declare a constant named CENTS_PER_
    5·2 answers
  • Be able to list a technology-based company and discuss whether it enjoys sustainable competitive advantage based on the resource
    13·1 answer
  • What is the 5 basic steps of computer programing?
    6·1 answer
  • What would you have to know about the pivot columns in an augmented matrix in order to know that the linear system is consistent
    13·1 answer
  • 97 points pleaseeee helpppp
    8·2 answers
  • What are some ways you can work with templates? Check all that apply.
    9·2 answers
  • What is the weirdest thing u saw at school asking teachers and students
    12·2 answers
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
  • Give three general reasons for the importance of computer networking.
    9·1 answer
  • Which two features could be added to a game using an "if () then " block
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!