Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- while True:
- os.system('cls')
- print('0-Exit')
- print('1-Area')
- print('2-Screen Clear')
- ans = input('Choose 0,1,2: ')
- ans = int(ans)
- if ans == 0:
- print('Bye!')
- exit(0)
- if ans == 1:
- r = input('enter r: ')
- r = float(r)
- a = 3.14 * r * r
- print(f'area = {a} for radius = {r}')
- if ans == 2:
- os.system('cls')
- os.system('pause')
Advertisement
Add Comment
Please, Sign In to add comment