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.
thank you, rowcased
with abs code works properly.
google advises me to use math.fab ))
as regards my code I know it is not optimal. I hope when I will be 2 kyu or higher it will be better ))
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 ... ?This comment is hidden because it contains spoiler information about the solution
you can post it as a reply on this thread, just mark it as a spoiler
rowcased, can I send you my code for this kata?
Okay, well this is just code. This does not have to be approved. Just click attempt on the bottom when coding and it will tell you if you have passed :).
PS: I don't believe true or false output is needed for this task. Rather the outlier number.
I can't speak for your pycharm difference, but I know you will get the expected
1
if your parentheses are in the right placepycharm result = 3
pytho console = 0
expected = 1
what's in this comment does not match what your pycharm image shows
thanks for idea.
but I found an issue:
console
import math
print (math.fabs(-9223372036854775807)%2)
0.0
PyCharm:
https://clip2net.com/s/42YI9QB
have you tried printing the input?
Python. Attempt stage: all tests are passed, except this one
" 0 should equal -9223372036854775807 "
and I can't see the initial list to check my code.