Question: Could somebody explain to me why my program isn't running properly (bear in mind we're not allowed to use break/continue statements). main.py # Set an

Could somebody explain to me why my program isn't running properly (bear in mind we're not allowed to use break/continue statements).  Could somebody explain to me why my program isn't running properly
(bear in mind we're not allowed to use break/continue statements). main.py #

main.py # Set an initial value for program to perform calculations restart = 'y' 3 4 # FLAG - while restart == 'y' or restart == 'Y': 5 # DUMMY PROGRAM x = 7 + 11 print('7 + 11 = {x}') # DUMMY PROGRAM 9 10 11 12 13 14 15 16 17 18 # Ask the user if they want to perform the calculations again, accept y only while restart != ('n', 'N') or restart != ('y', 'Y): # Ask user if they want to perform the calculation again (accept y or n only) restart = input('Would you like to restart the program (y)? ') # Terminate program if restart == 'n' or restart == 'N' : print('Thank you for being a loyal customer, have a great day!") # Run dummy program again elit restart == 'y' or restart == 'Y": print('Running again') # Prompt user to enter a valid entry (lowercase/uppercase 'y' or 'n') else: print('Invalid response) 19 20 21 22 23 24 25 Run: main /usr/local/bin/python3.8 "/Users/hectorreyes/PycharmProjects/TEST RUN/main.py" 7 + 11 = 18 Would you like to restart the program(y)? y Running again Would you like to restart the program(y)? n Thank you for being a loyal customer, have a great day! Would you like to restart the program(Y)? d Invalid response Would you like to restart the program(y)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!