- 1
How to hardcode a variable in python functions
def adds_numbers(x, y): return x + y my_sum = adds_numbers(10,31) print(my_sum) Error: the my_sum variable is not hard-coded.
2 odpowiedzi
+ 1
To my mind, it is hard-coded because the program doesn't accept user input, so my_sum will always be 41.
May I ask you to explain further what you are after and maybe also why you want this?
0
Hi Russ,
This is one of my task to complete but I struck here.