# Functions goes here import random def make_statement(statement, decoration): """ Creates headings (3 lines), subheadings (2 lines) and emphasised text / mini - headings(1 line).Only use emoji for single line statements""" middle = f"{decoration * 3} {statement} {decoration * 3}" top_bottom = decoration * len(middle) print(top_bottom) print(middle) print(top_bottom) def string_check(question, valid_answers=('yes', 'no'), num_letters=1): """Checks that users enter the full word or the 'n' letter/s of a word from a range of valid responses""" while True: response = input(question).lower() for item in valid_answers: # check if the response is the entire word if response == item: return item # check if it's the 'n' letters elif response == item[:num_letters]: return item print(f"Please choose an option from {valid_answers}") def not_blank(question): """Checks that a user response is not blank""" while True: response = input(question) if response != "": return response print("Sorry, this can't be blank. Please try again.\n") def int_check(question): """Checks users enter an integer""" error = "Oops - please enter an integer." while True: try: # Return the response if it's an integer response = int(input(question)) return response except ValueError: print(error) # Main Routine Goes here name_list = ['Morris ', 'Katherine', 'Audrey', 'Rodolfo', 'Stella', 'Blake', 'Mark', 'Holly', 'Dwight', 'Carmen', 'Julio', 'Patrice', 'Geoffrey', 'Marshall', 'Cindy', 'Jerome', 'Sue', 'Kay', 'Perry', 'Hilda', 'Debra', 'Robbie', 'Cory', 'Violet', 'Pamela', 'Charlotte', 'Susana', 'Juanita', 'Mayra', 'Kevin', 'Renee', 'Robert', 'Patricia', 'Carol', 'Jeff', 'Russell', 'Kristina', 'Fernando', 'Micheal', 'Oscar', 'Shelly', 'Gregory'] random_name = random.choice(name_list) make_statement("This application was created by Jackson McClure to imitate ordering a pizza for AS91896 & AS91897", "=") who=not_blank(f"hello welcome to in crust we trust my name is {random_name} who am I serving? ")