#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Posts
    1
    Rep Power
    0

    script to convert Roman numbers in to arabic


    Hi all!

    I need a python script that converts roman numbers into our known arabic numbers.

    So when you for example write the roman number 'IX' it will print the number '9'

    Anyone?

    Thanks
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Location
    Reutlingen, Germany
    Posts
    10
    Rep Power
    0
    [EDITED out] b/c the python cookbook has your answer
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    The excellent book 'Dive Into Python' by Mark Pilgrim uses this problem for the chapters on unit testing and test-driven development.

    The book is available free online. The relevant chapters start here.

    Dave - The Developers' Coach
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    This also came up on the forum last year, so if your still looking for more info maybe you could find that. If not, i'd go with Dive into Python.

    On an unrelated note: I recently saw this book in a book shop! Which shocked me slighly, but hey . It is out there for those who can't stand e-books.

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo