My homework question:
Create a script to receive the birth date and return the user\'s age
I tried this:
ano_atual =
You probably want raw_input instead of input. input
is equivalent to eval(raw_input())
in python2.x. So your string is being cast to an integer. just like:
a=30/6/2012
would be. (In this case, a
is the result of 30 divided by 6 divided by 2012 which is 0 because of integer division in python 2.)
use raw_input()
, input()
doesn't work here
Check out the tutorial on YouTube: http://www.youtube.com/watch?v=qsTdaxahTsM