Oct-26-2017, 02:09 PM
O.k., here is what I think is happening. Your "clear" command to clear the screen is preventing you from actually seeing the error, it erases the screen to fast for you to see. Try commenting the "os.system('clear')" and then run your script.
Output:Welcome,
Please choose the menu you want to start:
(1) Display operating system version
(2) Ping a web site
(Q) Quit
Enter your choice: 7
Not a correct choice: <7>,try again
Welcome,
Please choose the menu you want to start:
(1) Display operating system version
(2) Ping a web site
(Q) Quit
Enter your choice:
Either don't clear the screen, or add a time.sleep() after the 'print()'.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition