Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Python by registered user Yutharsan ( 3 years ago )
def Convert(num, base):
    string = ''
    while num >= 1:
        string = string + str(num % base)
        num = num // base
    return string[::-1]

message = input('Enter message: ')
base = int(input('Enter base: '))

final = ""
for char in message:
    ascii_number = ord(char)
    final += Convert(ascii_number, base)
print(final)

 

Revise this Paste

Your Name: Code Language: