import pandas # Functions go here def make_statement(statement, decoration, lines=1): """Creates headings (3 lines), subheadings (2lines) 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) if lines == 1: print(middle) elif lines == 2: print(middle) print(top_bottom) else: print(top_bottom) print(middle) print(top_bottom) def currency(x): """Formats numbers as currency ($#, ##)""" return "${:.2f}".format(x) # burger lists burger_types = ["Cheeseburger", "Pepperoni Burger", "Ham & Cheese Burger", "BBQ Burger", "Veggie Burger", "Meat-lovers Burger", "Spicy Chicken Burger", "Pesto Burger", "Hawaiian Burger", "Classic Burger"] special_burgers = ["Dessert Burger", "Butter Chicken Burger"] burger_cost = [6.50] * 10 special_price = [6.50, 6.75] # Create dictionaries burger_dict = { 'Burger': burger_types, 'Price': burger_cost, } special_dict = { 'Special Burger': special_burgers, 'Price': special_price, } # Create dataframes burger_palace_frame = pandas.DataFrame(burger_dict) burger_palace_frame.index = burger_palace_frame.index + 1 special_frame = pandas.DataFrame(special_dict) special_frame.index = special_frame.index + 11 # Apply currency formatting burger_palace_frame['Price'] = burger_palace_frame['Price'].apply(currency) special_frame['Price'] = special_frame['Price'].apply(currency) # Main routine make_statement(statement="Burger Borough", decoration="🍔") print(burger_palace_frame) make_statement(statement="", decoration="----") print(special_frame)