[Tutor] Help with converting a string into a integer
Carmen Salcedo
asc239 at live.com
Thu Oct 31 17:07:14 CET 2013
Hi Mark,
Thanks for the feedback. I figured it out. Yes, I'm using python 2.7 (typo in the last email).
Have a great day.
Sent from my iPhone
On Oct 31, 2013, at 10:44 AM, "Mark Lawrence" <breamoreboy at yahoo.co.uk> wrote:
> On 31/10/2013 02:00, Carmen Salcedo wrote:
>> Hi Everyone,
>>
>> I hope you're having a great week. I'm working on this program that
>> converts strings to integers. Can someone please help me out? :) Below
>> is the program:
>>
>> def main():
>> selection = input("Enter you choice. Enter 1 " +
>> "for Phone Translator or 2 for Backward String.")
>> while selection != 1 and selection !=2:
>> print "Invalid choice"
>
> I can tell from the print that you're using Python 2.x. For reasons that I won't go into here never, ever use input, use raw_input instead. So try that and when you hit problems please get back to us, giving the data that Bob Gailer asked for earlier.
>
> --
> Python is the second best programming language in the world.
> But the best has yet to be invented. Christian Tismer
>
> Mark Lawrence
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list