name=input('what is your name? ') print('Welcome to ',name) #this code checks if the user wants the rules or not while True: rules=input('Do you want to see how to play?(yes/no) ').lower() if rules in ('yes', 'y'): print(' ---- rules ----') print('For Square') print('Perimeter = 4 x length') print('area= length x length\n') print('For Rectangle') print('Perimeter = 2 x (width + length)') print('area = width x length\n') print('For Triangle') print('Perimeter = side a + side b + side c') print('area = 1⁄2 base x height\n') break elif rules in ['no','n']: print('I hope your good at math then.') break else: print('come again? (yes/no)') continue