Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Основні перемені
- i = int(5)
- p = float(3.14)
- radius = float(0)
- #Цикл доки користувач не захоче завершити програму
- while i == 5:
- #Запит вичислити чи ні та ввід радіусу
- #Asking user if he wants to find square or not and entering radius
- print ("Would you like to find square of circle ? Type 1 to agree and 0 or any other number to deny")
- choice = int(input())
- if choice == 1:
- print("Enter radius")
- radius = float(input())
- else:
- print("Ok. Stopping program")
- break
- #Ввивід результату
- #Output of result
- result = float(pow(radius,2)*p)
- print("Your result is: ", result)
- print("Would you like to continue finding squares(type in 1) or close program(type any number)")
- choice = 0
- #Запит на повторне вичесленян площі, при відмові зупинення та закритя програми
- #Asking if user wants to continue finding squares
- choice = float(input())
- if choice == 1:
- print ("Okay, continuing")
- print(" ")
- print(" ")
- print(" ")
- print(" ")
- continue
- else:
- print("Okay, made by Max Trotsenko, closing program")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement