Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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). image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions