0

How would I make a code with python to solve "a^2 +b^2 = c^2"? assuming that's the right equation.

Math

14th Dec 2020, 2:21 AM
amanda
3 odpowiedzi
+ 4
You can define a,b,c as variables and assign inputs to them like int(input()). Also you can use if-else statement to prove whether they are valid or not if a**2+b**2==c**2: print("yes") else: print("no")
14th Dec 2020, 2:57 AM
Simba
Simba - avatar
14th Dec 2020, 2:59 AM
Volodymyr Chelnokov
Volodymyr Chelnokov - avatar
0
amanda print((a * a + b * b) == c * c)
14th Dec 2020, 2:30 AM
A͢J
A͢J - avatar