+ 1
Tell me all the rules of playground..
I can run my code in other app but in playground It shows:;;=Error
8 ответов
+ 3
so show me your code :p
+ 2
I believe the issue has to do with you prompting the user for inputs again and again in the loop... In Code Playground we cannot intereact with the program when it is running and feed it inputs... We can only feed it something at the beginning
I say try running it elsewhere, with a text editor and IDLE on your laptop for instance and see hoe it goes
+ 2
And if you are using your phone there apps that do not have Code Playground's restrictions... I have an Android phone and I use Pydroid
+ 1
while True:
hy = input("h: ")
pr = input("p: ")
bs = input("b: ")
def my():
x = float(pr)**2 + float(bs)**2
from math import sqrt
result = sqrt(float(x))
return result
def my1():
x = float(hy)**2 - float(bs)**2
from math import sqrt
resultp = sqrt(float(x))
return resultp
def my2():
x = float(hy)**2 - float(pr)**2
from math import sqrt
resultb = sqrt(float(x))
return resultb
if hy == "find":
print("result is ")
print(my())
elif pr == "find":
print("result is ")
print(my1())
elif bs == "find":
print("result is ")
print(my2())
else:
print("please do input carefully")
+ 1
hy is hypotenuse
pr is perpendicular
bs is base
+ 1
it's for calculating any of side of right triangle when two other is given...
+ 1
egarly waiting for you replay....😊
+ 1
I am using the same.....there I can run it...