Re: [Tutor] Creating an Invalid Message for user

2014-04-19 Thread Albert-Jan Roskam
- Original Message - > From: Steven D'Aprano > To: tutor@python.org > Cc: > Sent: Saturday, April 19, 2014 3:58 AM > Subject: Re: [Tutor] Creating an Invalid Message for user > > Hello Saba, and welcome, > > Saba, unfortunately your email is almo

Re: [Tutor] Creating an Invalid Message for user

2014-04-18 Thread Steven D'Aprano
Hello Saba, and welcome, Saba, unfortunately your email is almost unreadable to me. To me, your code looks like this: On Fri, Apr 18, 2014 at 10:19:52PM +0100, Saba Usmani wrote: > print "Welcome to the binary and decimal converter"loop = Truewhile > loop: bord = raw_input("Enter b for binary

Re: [Tutor] Creating an Invalid Message for user

2014-04-18 Thread Alan Gauld
On 18/04/14 22:19, Saba Usmani wrote: I am meant to design code for a program that converts from binary number to decimal and vice versa. First, you know that python includes functions for doing that already right? So you are just doing this as a learning exercise? while loop: bord = r

[Tutor] Creating an Invalid Message for user

2014-04-18 Thread Saba Usmani
Hi, I am meant to design code for a program that converts from binary number to decimal and vice versa. This is what i have so far: print "Welcome to the binary and decimal converter"loop = Truewhile loop: bord = raw_input("Enter b for binary or d decimal or exit to exit")if bord == "b":

Re: [Tutor] Creating an Invalid message for user

2014-04-11 Thread Dave Angel
Saba Usmani Wrote in message: > > You posted in html so I can't quote your code, but why aren't you using int() to convert in one call? Second argument is the base to be used. value = int ("10011", 2) othervalue = int ("234") # default to decimal -- DaveA _

Re: [Tutor] Creating an Invalid message for user

2014-04-11 Thread Mark Lawrence
On 11/04/2014 21:58, Saba Usmani wrote: Hi, I am meant to design code for a program that converts from binary number to decimal and vice versa. This is what i have so far: print "Welcome to the binary and decimal converter" loop = True while loop: bord = raw_input("Enter b for binary or d

[Tutor] Creating an Invalid message for user

2014-04-11 Thread Saba Usmani
Hi, I am meant to design code for a program that converts from binary number to decimal and vice versa. This is what i have so far: print "Welcome to the binary and decimal converter"loop = Truewhile loop: bord = raw_input("Enter b for binary or d decimal or exit to exit")if bord == "b":