Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fun(num):
- if num <= 0:
- return ""
- elif num <= 26:
- return chr(64+num)
- else:
- return fun(int((num-1)/26))+chr(65+(num-1)%26)
- a = int(input("Enter the decimal number: "))
- for i in range(1,a+1):
- print(fun(i))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement