+ 2
What wrong here??
I wrote this but I don’t know what’s wrong. A = input () B = input () print ("A ->\n ") print ("B -> \n") C= (A**2)+(B **2) print ( math.sqrt(C)) Thank you very much for your time.
3 Antworten
+ 6
input always returns a string. Convert A and B to numeric type for performing arithmetic operations
+ 6
A and B should equal int(input()) because you can't multiply a string by a string
+ 3
the write code is
import math
A = int(input ())
B = int(input ())
print ("A ->\n ")
print ("B -> \n")
C= (A**2)+(B **2)
print ( math.sqrt(C))