+ 1

Tell me all the rules of playground..

I can run my code in other app but in playground It shows:;;=Error

13th Apr 2018, 11:21 AM
ALBERT SAURAV
ALBERT SAURAV - avatar
8 ответов
+ 3
so show me your code :p
13th Apr 2018, 11:24 AM
NoxFly
NoxFly - avatar
+ 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
13th Apr 2018, 11:32 AM
cyk
cyk - avatar
+ 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
13th Apr 2018, 11:37 AM
cyk
cyk - avatar
+ 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")
13th Apr 2018, 11:26 AM
ALBERT SAURAV
ALBERT SAURAV - avatar
+ 1
hy is hypotenuse pr is perpendicular bs is base
13th Apr 2018, 11:27 AM
ALBERT SAURAV
ALBERT SAURAV - avatar
+ 1
it's for calculating any of side of right triangle when two other is given...
13th Apr 2018, 11:28 AM
ALBERT SAURAV
ALBERT SAURAV - avatar
+ 1
egarly waiting for you replay....😊
13th Apr 2018, 11:28 AM
ALBERT SAURAV
ALBERT SAURAV - avatar
+ 1
I am using the same.....there I can run it...
13th Apr 2018, 11:38 AM
ALBERT SAURAV
ALBERT SAURAV - avatar