0
How can I add many formulas into a single code like finding a²,b²and c² at the same code
4 ответов
+ 3
P A Arrchith Iyer
Your code is correct,
But error is here:-
you want to calculate the square of 'b'. So use the same calculation as you did for 'a', which is multiplying 'a' by itself....
And remove unnecessary line`b = int(input())`
See this modified version ..
https://code.sololearn.com/cwAacqcqxIBV/?ref=app
+ 3
P A Arrchith Iyer can you describe more what specify you want?
In this code..
'b' is calculated as 'a * a', which means 'b(b²)' is also equal to 49(a²) when 'a' is 7.
So, output is 'Bottom Base = 49' when the user inputs 7.
+ 1
b the Bottom base is squared like if I input 7 it shows Bottom Base =. 49
and sometimes the answer is incorrect
Correct me if I am wrong
0
but I think your answer is wrong
There is a reason to add b
Because there is no link between a and b we can only find c,a or b with two sides of the right angled triangle