Skip to content

Commit

Permalink
Create factorial_while_loop.py (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnahmadbello authored and t2013anurag committed Oct 22, 2017
1 parent 5705ce5 commit 4b54d56
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions loop/python/factorial_while_loop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def main():
number = int(input("Enter any number: "))
result = 1
while number > 1:
result *= number
number -= 1
return result


main()

0 comments on commit 4b54d56

Please sign in to comment.