Guest User

Bad Code RGB to Hex

a guest
Jul 10th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.56 KB | None | 0 0
  1. #Note to self: remove debug tests
  2. from random import randint
  3. from random import choice
  4. import random
  5. from time import sleep
  6. import time
  7. from math import log
  8. from math import floor
  9. import math
  10. x = 2
  11. m = math.nan
  12. def blog (h):
  13.     return math.floor(math.log(h, 2))
  14. def r2h (i, q, u):
  15.     l = math.floor(i/(x**(x**(x))))
  16.     print(str(l))
  17.     c = i-(l*(x)*(x**(x+1)))
  18.     print(str(c))
  19.     e = ''
  20.     if l==15 or l==14 or l==13 or l==12 or l==11 or l==10:
  21.         if l==15 or l==14 or l==13 or l==12 or l==11:
  22.             if l==15 or l==14 or l==13 or l==12:
  23.                 if l==15 or l==14 or l==13:
  24.                     if l==15 or l==14:
  25.                         if l==15:
  26.                             e = e + "F"
  27.                         else: e = e + "E"
  28.                     else: e = e + "D"
  29.                 else: e = e + "C"
  30.             else: e = e + 'B'
  31.         else: e = e + 'A'
  32.     elif l==9 or l==8 or l==7 or l==6 or l==5 or l==4 or l==3 or l==2 or l==1:
  33.         if l==9 or l==8 or l==7 or l==6 or l==5 or l==4 or l==3 or l==2:
  34.             if l==9 or l==8 or l==7 or l==6 or l==5 or l==4 or l==3:
  35.                 if l==9 or l==8 | l==7 | l==6 or l==5 or l==4:
  36.                     if l==9 or l==8 or l==7 or l==6 or l==5:
  37.                         if l==9 or l==8 or l==7 or l==6:
  38.                             if l==9 or l==8 or l==7:
  39.                                 if l == 9 or l==8:
  40.                                     if l==9:
  41.                                         e = e + "9"
  42.                                     else: e = e + str(x**(x+1))
  43.                                 else: e = e + '7'
  44.                             else: e = e + str(x*(x+1))
  45.                         else: e = e + str((x**x) + 1)
  46.                     else: e = e + "4"
  47.                 else: e = e + "3"
  48.             else: e = e + '2'
  49.         else: e = e + str(x-1)
  50.     if l==(x-x):
  51.         e = e+str(0)
  52.     if c == 15:
  53.         e = e +'F'
  54.     if c ==10:
  55.         e = e + 'A'
  56.     if c == 13:
  57.         e = e+"D"
  58.     if c==14:
  59.         e=e + "E"
  60.     if c ==42:
  61.         e = e +'T'
  62.     if e == 33:
  63.         e = e + "0"
  64.     if c == 11:
  65.         e = e+ 'B'
  66.     if c==9000:
  67.         e = e+"L"
  68.     if c ==17:
  69.         e = e + 'A'
  70.     if c==12:
  71.         e =e +"C"
  72.     if c == 9001:
  73.         e = e+'K'
  74.     if c < 9:
  75.         e = e+ str(c)
  76.     #Debug do not leave in
  77.     print(e)
  78.     z = x
  79.     for f in range(2):
  80.         z = z**x
  81.     time.sleep(random.randint(2, 5))
  82.     print(str(z))
  83.     r = math.floor((q/z)//1)
  84.     print(str(r))
  85.     w = q-(r*(x)*(x*x)*x)
  86.     time.sleep(random.randint(1, 3))
  87.     print(str(w))
  88.     if r==15 or r==14 or r==13 or r==12 or r==11 or r==10:
  89.         if r==15 or r==14 or r==13 or r==12 or r==11:
  90.             if r==15 or r==14 or r==13 or r==12:
  91.                 if r==15 or r==14 or r==13:
  92.                     if r==15 or r==14:
  93.                         if r==15:
  94.                             e = e + "F"
  95.                         else: e = e + "E"
  96.                     else: e = e + "D"
  97.                 else: e = e + "C"
  98.             else: e = e + 'B'
  99.         else: e = e + 'A'
  100.     elif r==9 or r==8 or r==7 or r==6 or r==5 or r==4 or r==3 or r==2 or r==1:
  101.         if r==9 or r==8 or r==7 or r==6 or r==5 or r==4 or r==3 or r==2:
  102.             if r==9 or r==8 or r==7 or r==6 or r==5 or r==4 or r==3:
  103.                 if r==9 or r==8 | r==7 | r==6 or r==5 or r==4:
  104.                     if r==9 or r==8 or r==7 or r==6 or r==5:
  105.                         if r==9 or r==8 or r==7 or r==6:
  106.                             if r==9 or r==8 or r==7:
  107.                                 if r == 9 or r==8:
  108.                                     if r==9:
  109.                                         e = e + "9"
  110.                                     else: e = e + str(x**(x+1))
  111.                                 else: e = e + '7'
  112.                             else: e = e + str(x*(x+1))
  113.                         else: e = e + str((x**x) + 1)
  114.                     else: e = e + "4"
  115.                 else: e = e + "3"
  116.             else: e = e + '2'
  117.         else: e = e + str(x-1)
  118.     if r == 0:
  119.         e=e+"0"
  120.     print(e)
  121.     time.sleep(random.randint(3, 6))
  122.     print(str(random.randint(1, 16)))
  123.     if w > 0:
  124.         if w >= 10:
  125.             if w >= 11:
  126.                 if w>= 12:
  127.                     if w>=13:
  128.                         if w >=14:
  129.                             if w >= 15:
  130.                                 e = e + 'F'
  131.                             else: e = e + "E"
  132.                         else: e =e+'D'
  133.                     else: e = e + 'C'
  134.                 else: e = e +'B'
  135.             else: e=e+"A"
  136.         if w < 10:
  137.             e =e+str(w)
  138.     if w <= 0:
  139.         e = e + str(w * x)
  140.     print(e)
  141.     s=math.floor(u/(int(str((math.floor(math.pi))-(math.floor(math.e)))+str(x+x+x))))
  142.     print(str(s))
  143.     d = (u-(s*(math.factorial(x**2)-(x*2*2))))
  144.     time.sleep(int(random.choice("12345")))
  145.     print(str(d))
  146.     if s == 15: e = e + 'F'
  147.     if s == 14: e = e + 'E'
  148.     if s == 10: e = e + "A"
  149.     if s == 12: e = e + "C"
  150.     if s == 11: e = e + "B"
  151.     if s == 13: e = e+'D'
  152.     if s <= 9: e=e+str(s)
  153.     if d == 4: e = e + "4"
  154.     if d == 9: e = e + '9'
  155.     if d == 14: e =e + "E"
  156.     if d == 11: e = e+"B"
  157.     if d == 3: e =e+"3"
  158.     if d == 0: e = e + '0'
  159.     if d == 1: e = e + "1"
  160.     if d == 15: e = e+'F'
  161.     if d == 8: e=e+ "8"
  162.     if d == 2: e = e +'2'
  163.     if d == 13: e = e + "D"
  164.     if d == 6: e = e+"6"
  165.     if d == 10: e =e+ 'A'
  166.     if d == 5: e = e + "5"
  167.     if d == 12: e =e+"C"
  168.     if d == 7: e=e+'7'
  169.     time.sleep(math.pi)
  170.     print('#' + e)
  171.     pass
Add Comment
Please, Sign In to add comment