Aug-07-2019, 07:37 PM
(Aug-07-2019, 07:34 PM)Yoriz Wrote: I fixed the indentation and now get stuck in option 1 as option is not altered inside of the while loop.
Output:1: Add a Question 2: Delete a Question 3: List all FAQ 4: Exit Please enter your selection: 1 Enter a question to be added: this The answer to the question is: that Your FAQ has been added. Enter a question to be added:
I moved the option = int(input()
while not done: print(menu) option = int(input("Please enter your selection: ")) if option == 1: question = input("\nEnter a question to be added: ") answer = input("\nThe answer to the question is: ") if question in FAQ: print('FAQ already exists') FAQ[question] = answer print('Your FAQ has been added. ') item = question