def make_statement(statement, decoration): print(f"{decoration * 3} {statement} {decoration * 3}") def string_check(question, valid_ans_list=('yes', 'no'), num_letters=1): while True: response = input(question).lower() for item in valid_ans_list: if response == item: return item elif response == item[:num_letters]: return item print(f"Please choose an option from {valid_ans_list}") def instructions(): make_statement(statement="Instructions", decoration="ℹ️") print(''' For each ticket holder enter ... - Their name - Their age - The payment method (cash / credit) The program will record the ticket sale and calculate the ticket cost (and the profit). Once you have either sold all of the tickets or entered the exit code ('xxx'), the program will display the ticket sales information and write the data to a text file. It will also choose one lucky ticket holder who wins the draw (their ticket is free). ''') # MAIN PROGRAM STARTS HERE make_statement(statement="Mino Movie Fundraiser Program", decoration="🍿") print() want_intro = string_check("Do you want to see the instructions? ") if want_intro == "yes": instructions() print() print("Program continues...")