def make_statement(statement , decoration): """emphasises headings by adding decoration""" print(f"{decoration * 3} {statement} {decoration * 3}") def string_check(question, valid_ans_list=('yes', 'no'), num_letter=1): """checks the users enter the full word or the first letter of a word from a list of responces""" while True: response = input(question).lower() for item in valid_ans_list: #checks if the response is the entire word if response == item: return item #checks if the responce is the first letter elif response == item [:num_letter]: return item print(f"please choose an option from {valid_ans_list}") def instructions(): print("instuctions") print( "first select a shape that you want to find the area of.second please enter the dimentions of the shape then follow the steps again if you need to find the area of another shape if you wish to exit you can enter xxx and the program will end this will also show you all the shapes you have put in with the answers ") #main routine gose here make_statement("area caulator ", "📏") print() want_insturctions = string_check("do you want to see the instuctions?") if want_insturctions == "yes": instructions() print() print("program contineues")