0

Python , using py

Can someone explain how can ı turn this ; print('LĂŒtfen çapı yazınız Orhan Bey') çap=input('x') r=(int(çap))/2 pi=3.14 alan=pi*(r*r) print('Alanınız=',alan) input() (dont care the words it is just a program finding area from r) to a program ı can use without closing and opening the py

3rd Dec 2018, 3:12 PM
Balamber
Balamber - avatar
4 Answers
+ 2
Then I think you want something like this (it doesn't work on Sololearn): print('LĂŒtfen çapı yazınız Orhan Bey') while True: # repeat forever çap=input('x') if int(cap) < 0: break # stop when negative num r=(int(çap))/2 pi=3.14 alan=pi*(r*r) print('Alanınız=',alan)
3rd Dec 2018, 5:53 PM
Paul
Paul - avatar
+ 1
Do you want to repeat input so you can repeat the calculation? Or do you want the program to do something different after the second input?
3rd Dec 2018, 4:31 PM
Paul
Paul - avatar
0
I just want to repeat input so it can repeat same calculation
3rd Dec 2018, 5:40 PM
Balamber
Balamber - avatar
0
Thank you so much bro
3rd Dec 2018, 5:55 PM
Balamber
Balamber - avatar