 <p>When you put inverted commas round something it makes it into a string, so <code>'month'</code> means the word this, whereas <code>month</code> means the value in the variable called month.</p> <p>Your program will stop giving you that particular error if you remove the <code>'</code>s:</p> <pre><code>D = input() A = ( (14 - month) /12) Y = ( Year - A ) MonthProblem = ( month + 12 * A - 2 ) week = ( (D + Y + Y/4 - Y/100 + Y/400 + 31 * MonthProblem/12) % 7 ) </code></pre> <p>Had you defined the values of <code>month</code> etc before?</p>