<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 7, 2014, at 10:10 PM, Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">It might be easiest to think in terms of a single "divide into<br>quotient and remainder" operation. Let's leave aside<br>weeks/days/hours/minutes/seconds and split a number up into its<br>digits. (This is actually not as useless as you might think; in low<br>level programming, this is how to display a number on the screen, for<br>instance.)<br><br>number = int(raw_input("Enter a five-digit number: "))<br><br>Now we begin to split it up:<br><br>foo = number % 10<br>bar = number / 10<br><br></div></blockquote></div><div><blockquote type="cite"><div style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Do you know, without running the code, what 'foo' and 'bar' will be?<br>Give those two variables better names (hint: one of them would be<br>appropriately named "last_digit"), and then work on some more pieces<br>of the puzzle.</div></blockquote><div><br></div><div><br></div>So, if I use the five digit # 50000, bar = 5000, and foo = 0 because there is no remainder after dividing by 10?  Does it make a difference weather foo or bar are written first?  </div><div><br></div><div> <br>Thanks for the help Chris!  </div><div><br></div><div><br></div><div><br><blockquote type="cite"><div style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://mail.python.org/mailman/listinfo/python-list">https://mail.python.org/mailman/listinfo/python-list</a></div></blockquote></div><br></body></html>