The Artima Developer Community
Sponsored Link

Python Answers Forum
Can you write a factorial function?

15 replies on 2 pages. Most recent reply: Mar 19, 2019 5:26 AM by Robert Thompson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 15 replies on 2 pages [ « | 1 2 ]
Robert Thompson

Posts: 2
Nickname: robert123
Registered: Mar, 2019

Re: Can you write a factorial function? Posted: Mar 19, 2019 5:26 AM
Reply to this message Reply
Advertisement
Its easy to write this fuction :

def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)

Hate to write essays however I used a lot of useful information here https://handmadewriting.com/blog/guides/cause-and-effect-essay-outline/".They are providing reliable services on any kind of assignment assistance. Highly recommend!

Flat View: This topic has 15 replies on 2 pages [ « | 1  2 ]
Topic: writing string variable to file Previous Topic   Next Topic Topic: writing a number variable to a file

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use