How do i write the code for this

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anderson1373
    New Member
    • Nov 2009
    • 23

    How do i write the code for this

    I want to write a program that will prompt the user for a number, its base, and the base to which it should be converted. I want the program yo convert the number and display an appropriate comment with the resulting number. The number entered will be either an integer or real number.

    The conversion process is from source base to decimal, then from decimal to the target base. For nonterminating conversions, I only need five places after the decimal.
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Did you have a question? If this is homework, we cannot provide a solution for you, but we can help you in your efforts. Here's a hint for a start.
    Code:
    # Prompt user for a number
    num = raw_input("Enter a number")
    BV
    Moderator

    Comment

    Working...