Re: [Tutor] Additional help

2013-02-13 Thread Prasad, Ramit
Ahmet Can KEPENEK wrote: > Hello, > I used regular expression module of python. I checked binary and denary > numbers. If input is invalid i > ask again. I edited your code. Code is below follow as . > [snip] >     if re.match("^[0-1]*$", binary): >     if re.match("^[0-9]*$", denary2): [

Re: [Tutor] Additional help

2013-02-11 Thread Ahmet Can KEPENEK
Hello, I used regular expression module of python. I checked binary and denary numbers. If input is invalid i ask again. I edited your code. Code is below follow as . import re def show_menu(): print("===") print("1-binary to denary") print("2-denary to binary") print("3-e

Re: [Tutor] Additional help

2013-02-10 Thread Brian van den Broek
On 10 February 2013 15:29, Ghadir Ghasemi wrote: > Hi guys, I wondered if you knew what I could add to this code so that when > the user enters 1 from the menu and then doesn't enter a valid binary number > the program should ask them over and over again until valid binary number is > entered.

[Tutor] Additional help

2013-02-10 Thread Ghadir Ghasemi
Hi guys, I wondered if you knew what I could add to this code so that when the user enters 1 from the menu and then doesn't enter a valid binary number the program should ask them over and over again until valid binary number is entered. here is the code: def show_menu(): print("==