Question: If your program isn't given exactly one command line argument, it should print a usage message and exit immediately: [ dent@bistromath ] $ python 3
If your program isn't given exactly one command line argument, it should print a usage message and exit immediately:
dent@bistromath$ python main.py USAGE: main.py menu.tsv
If the user tries to order something that isn't on the menu, your program should print an error message. It should not exit in this case; it should keep waiting for more user input.
dent@bistromath$ python main.py datacheesetsv TODAY'S MENU: Cheese $ What would you like to order? Cheese Wine Sorry, "Wine" isn't on the menu.
There might be whitespace spaces tabs newlines, etc. on either end of the user input. Use the strmember function strip to remove these spaces from each line of input before processing it If the result is an empty string, your program should ignore it and move on to the next line.
If the user hasn't successfully ordered anything by the time you reach the end of the user input, your program should exit without printing the order or the preceding newline
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
