Sep-24-2020, 01:25 PM
(Sep-24-2020, 01:11 PM)buran Wrote: Ah, OK
they complain because we usemy_sum
also inside the function and their check "thinks" it is hardcoded
def adds_numbers(x, y): return x + y my_sum = adds_numbers(10, 31) print(my_sum)or just use different name inside the function
def adds_numbers(x, y): result = x + y return result my_sum = adds_numbers(10, 31) print(my_sum)
I tried both the options but validition2 got fail again
Checking if the my_sum variable is not hard-coded.
Description
Searched your code for a specific pattern:
my_sum\s*=\s*(10|31)\s*\+\s*(10|31)