# myapp.py # this is the main program run file # it will use functions from myfunctions.py import myfunctions # page 34 for import keyword reference # page 35 main function def main(): #pass # all my functions go here # Header myfunctions.myHeader() # print() # Menu myfunctions.mainMenu() # Details # myfunctions.modifiedSalesTax() print("---Contact Information----") print() fName = "Philip" lName = "Matusiak" result = myfunctions.full_name(fName, lName) print(result) print() print("--- Read the contacts from CONTACTS.csv ---") import chapter4 chapter4.readAllRows() print("---New Contact Information Request---") # use a while keyword to ask the user if they want to add a new contact, if yes ask the 3 inputs FN,LN,Zip. Then create a list for the new contact while True: createNewContact = input("Do you want to add a new contact (yes/no)?") if createNewContact.lower() == "no": break new_firstName = input("Enter the contact first name: ") new_lastName = input("Enter the contact last name: ") new_zipCode = input("Enter the contact zipcode: ") # Create the list for the new contact list_newContact = [new_firstName, new_lastName, new_zipCode] chapter4.writeAllRows(list_newContact) # Read the new contacts chapter4.readAllRows() # call the writeAllRows() function and add the arg for new_contact print("----- Cart Information -----") st = 52.5 tax = 2.34 disc = 5 total = myfunctions.cart_Total(st, tax, disc) print(total) # 49.84 assertion testing # Order Details print("Datetime Stamp:", myfunctions.orderTimestamp) ## Use string format to format the datetime class ## Wednesday December 6, 2023 formattedDate = myfunctions.orderTimestamp.strftime("%A %B %d, %Y") print(formattedDate) ## Wed Dec 6, 2023 formattedShortDate = myfunctions.orderTimestamp.strftime("%a %b %d, %Y") print(formattedShortDate) myfunctions.invoiceAging() # Footer myfunctions.myFooter() # Application if __name__ == "__main__": main()