Re: Python 2.7.6 help with modules

Discussion in 'Python' started by Chris Angelico, Feb 8, 2014.

  1. On Sat, Feb 8, 2014 at 5:27 PM, Scott W Dunning <> wrote:
    > Ok, so it this what you’re talking about?
    >
    >
    > number = int(raw_input(“Enter a five digit number:))
    > foo = number % 10
    > bar = number / 10
    >
    > digit = foo / 10
    > rem = bar % 10
    >


    Close! But if you print out foo and bar, you'll see that you're naming
    them backwards in the second one. The last digit is the remainder
    (modulo), the rest is the quotient.

    ChrisA
     
    Chris Angelico, Feb 8, 2014
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Remy Cool
    Replies:
    1
    Views:
    433
    Remy Cool
    Aug 27, 2003
  2. Tobiah
    Replies:
    2
    Views:
    312
    Tobiah
    Sep 14, 2003
  3. Ben Weintraub

    Disabling modules using Modules/Setup

    Ben Weintraub, Sep 9, 2006, in forum: Python
    Replies:
    0
    Views:
    356
    Ben Weintraub
    Sep 9, 2006
  4. Peter Peyman Puk

    Importing v reloading modules modules

    Peter Peyman Puk, Mar 19, 2010, in forum: Python
    Replies:
    0
    Views:
    301
    Peter Peyman Puk
    Mar 19, 2010
  5. ImpalerCore
    Replies:
    0
    Views:
    842
    ImpalerCore
    Mar 10, 2011
Loading...

Share This Page