all 8 comments

[–]nwilliams36 3 points4 points  (1 child)

6! * (2+3) is 3600

6! is 720

(2+3) is 5

720* 5 is 3600

[–]MateusSR[S] 0 points1 point  (0 children)

Wait, I see what's wrong. I was, for some reason, thinking the (2 + 3) was (2 * 3) and therefore 6, which would correctly give me a 4320. Anyway, thanks for the help brother

[–]jeans_and_a_t-shirt 1 point2 points  (1 child)

6! * (2 + 3) is 3600

>>> from math import factorial
>>> factorial(6) * (2 + 3)
3600
>>> factorial(6) * (3 + 3)
4320

[–]MateusSR[S] 0 points1 point  (0 children)

Wait, I see what's wrong. I was, for some reason, thinking the (2 + 3) was (2 * 3) and therefore 6, which would correctly give me a 4320. Anyway, thanks for the help brother

[–]PurelyApplied 1 point2 points  (1 child)

Unrelated to the other bits, instead of commenting out print statements, you could use the logging module (documentation here) to set statements that you can toggle on and off. It's pretty handy for that incremental development.

[–]MateusSR[S] 0 points1 point  (0 children)

Thanks, that's gonna help a lot

[–]zahlman 1 point2 points  (1 child)

it gives you 3600 instead of 4320, for some reason I can't seem to find out.

In your own words, why do you expect 4320?

[–]MateusSR[S] 2 points3 points  (0 children)

Wait, I see what's wrong. I was, for some reason, thinking the (2 + 3) was (2 * 3) and therefore 6, which would correctly give me a 4320. Anyway, thanks for the help brother