Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Each triangle has internal angles summing up to 180 degrees.
So, we multiply the number of triangles by 180 to get the total sum of internal angles.
Probably one of the slowest solutions is the top vote.. xD
(at least it's easy to read)
Does this work?
Why do we multiply it by 180?
i dont have to print it
HAHA
This is clever, but not so intuitive in my opinion.
But I'm just getting started with Python and programming in general, so I might change my opinion further down the rabbit hole!
this guy is funny
lol
Excuse me but who upvotes this as a best practice :D
Hello,
from what I understand, if (number % a > 0 or number % b > 0) it will return False because then that is some value.
number % a here is equals to number % a > 0.
so, the program returns True if number % a and number % b DO NOT have any values( because then they are of value 0 )
I know it does. It is easy to fix it but guess what, I didn't CARE.
Also dividing integers by 2 is FAST and len() is also FAST.
This implementation calls len(s) FIVE times when it only needs to call it once. It also divides len(s) by 2 FIVE times when it only needs to calculate it once.
see here, plz
Approved
Loading more items...