# Repetición
# Conversion de un valor natural pedido por teclado de base 10 a base 8.
base10 = int(input("Dame un valor entero: "))
octal = ""
while base10 > 8:
resto = base10 % 8
octal = chr(ord('0') + resto) + octal
base10 //= 8
octal = chr(ord('0') + base10) + octal
print("En octal es:", octal)
IyBSZXBldGljacOzbgojIENvbnZlcnNpb24gZGUgdW4gdmFsb3IgbmF0dXJhbCBwZWRpZG8gcG9yIHRlY2xhZG8gZGUgYmFzZSAxMCBhIGJhc2UgOC4KCmJhc2UxMCA9IGludChpbnB1dCgiRGFtZSB1biB2YWxvciBlbnRlcm86ICIpKQoKb2N0YWwgPSAiIgoKd2hpbGUgYmFzZTEwID4gODoKICAgIHJlc3RvID0gYmFzZTEwICUgOAogICAgb2N0YWwgPSBjaHIob3JkKCcwJykgKyByZXN0bykgKyBvY3RhbAogICAgYmFzZTEwIC8vPSA4CgpvY3RhbCA9IGNocihvcmQoJzAnKSArIGJhc2UxMCkgKyBvY3RhbApwcmludCgiRW4gb2N0YWwgZXM6Iiwgb2N0YWwpCg==