SHARE
TWEET

Untitled

a guest Oct 10th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fun(num):
  2.     if num <= 0:
  3.         return ""
  4.     elif num <= 26:
  5.         return chr(64+num)
  6.     else:
  7.         return fun(int((num-1)/26))+chr(65+(num-1)%26)
  8.  
  9. a = int(input("Enter the decimal number: "))
  10.  
  11. for i in range(1,a+1):
  12.     print(fun(i))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top