Re: [Tutor] help with integers
On Tue, Sep 14, 2010 at 8:00 PM, Ciera Jones cjo1...@gmail.com wrote: Hi When I enter myvar= raw_input (Please excuse a number of movies: ) and I try and convert it to an integer it gives me an error message. I put in: movietotal= int(myvar)* 3 and I get an error message Ciera post your code.. and also windows/linux/mac? if you post code and error message it will be easier to help ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Joel Goldstick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] help with integers
Ciera Jones cjo1...@gmail.com wrote When I enter myvar= raw_input (Please excuse a number of movies: ) and I try and convert it to an integer it gives me an error message. I put in: movietotal= int(myvar)* 3 and I get an error message Don't put quotes around the variable name. Python is trying to convert the string myvar to an int, which it can't. BTW When posting it is best to send the code plus entire error message, it greatly helps us debug the problem. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor