Thanks for taking the time to explain the concepts. I understand it better now as to why you suggested the things you do. No one explains these concepts when u go through an online lesson. Thanks!
As to point 5, I learn from the previous assignment I did as below.
As to point 5, I learn from the previous assignment I did as below.
def add_report(report): total = 0 items = "" user = input("Enter an integer to add to toal or Q") while True: if report.upper() == "T": user_1 = input("Enter integer or Q to quit") if user_1.isdigit(): total = int(user_1) + total elif user_1.upper() == "Q": print("\nTotal:\n",total) break elif report.upper() == "A": user_1 = input("Enter integer or Q to quit") if user_1.isdigit(): total = int(user_1) + total items = items + "\n" + user_1 elif user_1.upper() == "Q": print("\nItems\n",items,"\n","Total: ","\n",total) break else: print("Invalid input") add_report("A")There's this line, " items = items + "\n" + user_1 ", my understanding is this will loop the numbers as I input them and it will be called when this " print("\nItems\n",items,"\n","Total: ","\n",total) " is being executed. So I thought in my menu code, as I input the 4 choices, all these choices will be added but seems like it's not working. I'm kinda stuck now