from stack import Stack

def pnum(num):
    l = ["a", "b", "c", "d", "e", "f"]
    if num >= 10:
        print(l[num - 10], end="")
    else:
        print(num, end="")

def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print("Enter a base less than 16 and more than 1")
        return 0

    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base

    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


num = int(input("Enter the decimal number: "))
base = int(input("Enter the base: "))
baseConverter(num, base)


9d489f0efd38debf8a972c1112c7735b66588d28
<mask token>


def pnum(num):
    l = ['a', 'b', 'c', 'd', 'e', 'f']
    if num >= 10:
        print(l[num - 10], end='')
    else:
        print(num, end='')


def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print('Enter a base less than 16 and more than 1')
        return 0
    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base
    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


<mask token>

<mask token>


def pnum(num):
    l = ['a', 'b', 'c', 'd', 'e', 'f']
    if num >= 10:
        print(l[num - 10], end='')
    else:
        print(num, end='')


def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print('Enter a base less than 16 and more than 1')
        return 0
    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base
    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


<mask token>
baseConverter(num, base)

<mask token>


def pnum(num):
    l = ['a', 'b', 'c', 'd', 'e', 'f']
    if num >= 10:
        print(l[num - 10], end='')
    else:
        print(num, end='')


def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print('Enter a base less than 16 and more than 1')
        return 0
    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base
    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


num = int(input('Enter the decimal number: '))
base = int(input('Enter the base: '))
baseConverter(num, base)

from stack import Stack


def pnum(num):
    l = ['a', 'b', 'c', 'd', 'e', 'f']
    if num >= 10:
        print(l[num - 10], end='')
    else:
        print(num, end='')


def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print('Enter a base less than 16 and more than 1')
        return 0
    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base
    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


num = int(input('Enter the decimal number: '))
base = int(input('Enter the base: '))
baseConverter(num, base)

from stack import Stack

def pnum(num):
    l = ["a", "b", "c", "d", "e", "f"]
    if num >= 10:
        print(l[num - 10], end="")
    else:
        print(num, end="")

def baseConverter(decNum, base):
    if base > 16 or base <= 1:
        print("Enter a base less than 16 and more than 1")
        return 0

    n = Stack()
    while decNum != 0:
        n.push(decNum % base)
        decNum = decNum // base

    while n.isEmpty() is not None:
        pnum(n.peek())
        n.pop()
    print()


num = int(input("Enter the decimal number: "))
base = int(input("Enter the base: "))
baseConverter(num, base)

