-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
- Open https://hyperskill.org/learn/step/7718
- Submit the following code:
def condition(x, y, gt):
return x > y if gt else x < y
def min_max_sort(elements):
gt = 1
for i in range(len(elements) - 1):
index = i
gt = (gt + 1) & 1
for j in range(i + 1, len(elements)):
if condition(elements[j], elements[index], gt):
index = j
elements[i], elements[index] = elements[index], elements[i]
ar = list(map(int, input().split()))
min_max_sort(ar)
print(*ar)
There is a code style error for elements[i], elements[index] = elements[index], elements[i]:
Found incorrect unpacking target
Found incorrect unpacking target
Found line with high Jones Complexity: 15 > 14
that didn't show up 4 months ago.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed