Decimal Base Conversion using PYTHON

Posted by Butinyane More on Stack Overflow See other posts from Stack Overflow or by Butinyane More
Published on 2010-03-31T12:09:50Z Indexed on 2010/03/31 12:13 UTC
Read the original article Hit count: 413

Filed under:
|
|

PROBLEM DESCRIPTION

Given a decimal number, and a new base to represent it in. If the base is larger than 10, use capital letters for the digits(that is, A is 10, B is 11 and so forth). The decimal number given, and the new base, will both be integer values, separated by a space. The base to convert to will always be smaller than or equal to 30. Please create a program that will convert a decimal number to any base in this instance. When evaluating the program the sample input must something like:

18 2

and the program must output the following:

10010

Please i beg of you to send me a solution to this problem as soon as possible.

© Stack Overflow or respective owner

Related posts about python

Related posts about c#2.0