---
title: "Discussion on \"100 days of python Exercises\" | Hashnode"
description: "Discussion on \"100 days of python Exercises\". Day 12: Python exercise that involves calculating the factorial of a number using a loop.\ndef factorial(n): if n < 0: \n      return \"Factorial is not defined for negative numbers.\"\n\nresult = 1 \n        for i in range(1, n + 1): \n        result *= i r..."
url: "https://hashnode.com/posts/100-days-of-python-exercises-1-1-1-1-1-1-1-1/64dbef7856f9632731f76cbe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [100 days of python Exercises](https://brrrpcodes.hashnode.dev/100-days-of-python-exercises-1-1-1-1-1-1-1-1?utm_source=hashnode&utm_medium=feed)

Day 12: Python exercise that involves calculating the factorial of a number using a loop. def factorial(n): if n < 0: return "Factorial is not defined for negative numbers." result = 1 for i in range(1, n + 1): result \*= i r...

Aug 15, 2023 · 1 min read · brrrpcodes.hashnode.dev  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#100daysofcode](https://hashnode.com/tag/100daysofcode)
-   [#100daysofdatascience](https://hashnode.com/tag/100daysofdatascience)
-   [#python](https://hashnode.com/tag/python)

## Written by

[Bright Andoh](https://hashnode.com/@Brighht)

@Brighht · Accra,Ghana

  
[View profile](https://hashnode.com/@Brighht)

|Mastering python🧠|Aspiring Data Scientist 📊|Game Enthusiast🎮|Robotics🦾

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
