Mit6.189 Handout 1 optional ex 1.
I am doing the zeller.py (optional question) and i have a problem. Whenever i enter 08 or 09 for the year it says
Desktop/Python/Mechanical Mooc/HomeWork/6.189/Handout 1/zellers.py", line 11, in
It would appear its an octal (?) I was using input to get an int. To remedy this i needed to use raw_input to get the result I required.
@jtb1979 can you post a link to your code? a lot of people use services like these: https://gist.github.com/ http://pastebin.com/
Here is my code..... http://pastebin.com/9qsYZDvb I thought I had cracked it but maybe not.
Well after a bit of research I have discovered an answer. When I enter the dates i need to input them as a string otherwise it will recognize 08 / 09 as an octal which will crash the program. And then before I use them in any calculations i need to convert them into strings. It seems to work fine.
Join our real-time social learning platform and learn together with your friends!