"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

Reply via email to