8
Last seen 3 years ago
Member for 8 years, 7 months, 5 days
Difficulty Normal
using multiple return point is not really neccesary and even malicious.
More
Wow, you just reinvented a bicycle! :)
There is a built-in int() in Python that can use radix as a second argument:
int('FF', 16) == 255
More
good idea of counting x,o or d's.
multiple return is harmful u'd better avoid it.
More
Hi! Clear one but why soo much conditions to check? The task gives strict definitions on your 1st "if" so i suppose it is not needed. Good luck!
More
Nice and clear. By the way, you can remove True from line 4
== True
in "if" condition,
if i.isupper():
is enough in Python! :)
More
All clear. Btw you can use key=abs w/o arguments in sorted to make it a bit more simple)
More
I am not a real python pro but regarding you 1st conditions it was mentioned in task (last few lines):
**Precondition: 0 < len(array) ≤ 10
0 ≤ N
all(0 ≤ x ≤ 100 for x in array)**
So you do not need to filter input like you did in the first IF
Btw my solution was like:
def index_power(arr
More