+ 2
I have a math problem so this is the code and he didn't work so why?
16 Réponses
+ 5
WHAT OUTPUT DO YOU ***EXPECT***?
You need to call the function with () AND arguments for a, b, c!
For example:
print(equation(1, 1, 1))
+ 6
Constant Audibert One of the most needed skills for a programmer is to communicate in a logical way.
1. "I have a math problem". Which one?
2. "It didn't work". What should it do? What did it do instead?
3. "The output is strange". How?
Vague information leaves us only guessing.
Also, you had good answers (as possible without minimal info). Read them, answer the requests for info and apply the suggestions.
Allow people to help you.
+ 5
You are not calling. printing function reference.
You are not passing arguments.. Pass a, b, c
try
print(equation(a,b,c))
print(equation(1,2,1))
print(equation(4,3,1))
+ 2
What input do you test?
What output do you expect?
You never called the function in your code.
+ 2
Did not works means?
No output? : you have function definition only. To use it, call or invoke it.
Any other?
+ 1
Thanks Lisa and Jayakrishna.
When I invoke the function the output is strange
+ 1
Ты не нашел корень(√), но я сделал похожую на твою:
https://code.sololearn.com/cQ8X0B4T9tTn/?ref=app
+ 1
when you want to call any function, you have to find out if it has arguments, and then call it from another function (like in your case, print())
+ 1
thanks everyone for taking the time to respond.
+ 1
The arguments declared in the parentheses of the function are only for that function to use, not anything else's.
This means that, even though you assigned a, b, and c, the arguments of the function don't get assigned.
Plus, calling the function's name without the parentheses, after you declared it, will only show the info of it. Well, in JS, but Python shows something... different.
+ 1
Fix the last line>>>print(equation(a,b,c))
+ 1
Aryaman Madge Pls don't offer ready solutions. Remember this is a learning app, so the OP has to go through the solving process to learn. Prefer giving hints for the OP to find the solution.
Also, pls don't write in all upper case. This means shouting.
0
I think you should visit work more and more with people this is because of no enough information.And dont say that no output the thing is the output is not as you expected
0
WHICH PROGRAMMING LANGUAGE AND WHAT MATH PROBLEM I WILL SOLVE IT.
0
Aryaman Madge If you read the OP's replies you can find out what it is about. Apparently, OP was able to fix their code issue now.
- 2
По