Writing a program that inputs a three digit number to output the digits on a single line
<p>I am writing a program on python that will allow the user to input any three digit number and will output the number as separate digits.</p>

<p>This is what I have right now </p>

<pre><code>val = int(raw_input ("Type your three digit number please:"))

print 'The first digit is {}' .format (val // 100)
print 'The second digit is {}'.format (val % 100)
print 'The third digit is {}'.format (val % 10)`
</code></pre>

<p>However, for the the second digit I am not sure how to retrieve that. I know the number should not be 100 as it returns the last two digits to me then. </p>

<p>Can someone please help me?</p>

<p>Also does anyone know how I would then proceed to adding the digits up? </p>
