0
Why answer is not print???!
https://sololearn.com/compiler-playground/cPUwtu7K9UU8/?ref=app
5 odpowiedzi
0
It returns nothing since in the way you’ve defined those functions, they need to be defined after the input has been taken to work, a better way to solve this would be by simply making the functions take X and Y as arguments like this: def sum(x, y)
It will then work as intended.
Another issue is that your code is hard to read, it doesn’t affect its functionality, but spacing operators, variables and values makes it look way more appealing, trust me it helps alot, make it a habbit!
+ 3
Shivi Kushwaha please have a look at this code as per the previous comments by Mihaly Nyilas and Ruben
https://sololearn.com/compiler-playground/c5s5I0bXjN3M/?ref=app
+ 1
4
7
0
works properly in BroFar's code :-)
1st step: if a function, there is a return
2nd step: if it needed, use functional parameter(s)
0
if you are using a function, then it have to give back something
0
When you are defining the functions, you are declaring a=x something y, but you are not passing x and y as parameters of the function.