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.
you are welcome. by the way: you should KNOW WHY math.fabs was the wrong choice. if you can't explain it, go find out. (I didn't know until I looked it up so I could help you). You owe it to yourself to do this research and know the difference.
okay i get what you did here, but first off best not to repeatedly use fabs AND indexing AND % 2 six times for
[0]
, four for[1]
, and twice for[2]
. but what I really want to know is: what prompted your use of math.fabs() over abs() in the first place ... ?you can post it as a reply on this thread, just mark it as a spoiler
I can't speak for your pycharm difference, but I know you will get the expected
1
if your parentheses are in the right placewhat's in this comment does not match what your pycharm image shows
have you tried printing the input?