Problem Solving

Problem Solving



Write a program to find a factorial of a given number.


6! = 720, 5! = 120, 4! = 24


  • Try to solve it in a most simple and efficient way.
  • Share your codes in the comments (in any language), I'll find some bugs ๐Ÿ˜‰.
  • Feel free to mention if you find any bugs in my code ๐Ÿง.
  • Share some challenges in the comments, I'll solve them in my next blog post.


  • Never see my code before solving it on your own.


import math

num = 5
print([i for i in range(1, num + 1)]))

I've used Python for solving this challenge, but if you want the same solution in some other languages let me know in the comments ๐Ÿ‘‡.