Guest User

bad_code_coding_challenge_13

a guest
Jun 18th, 2019
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.52 KB | None | 0 0
  1. #!/usr/bin/python3
  2. import requests
  3.  
  4.  
  5. def tfft(b):
  6.     return not b
  7.  
  8.  
  9. def get_char_list():
  10.     r = []
  11.     processed_chicken = requests.get(
  12.         "https://en.wikipedia.org/wiki/Rube_Goldberg_machine"
  13.     )
  14.     for c in processed_chicken.text.replace(" ", ""):
  15.         r.append(c)
  16.         r = list(set(r))
  17.  
  18.     return r
  19.  
  20.  
  21. def options():
  22.     return [None]
  23.  
  24.  
  25. def is_ma_lady_an_odd_one(arrrrrrrrrrrrrrrrrrrrrrrrrrrr):
  26.     arrrrrrrrrrrrrrrrrrrrrrrrrrrrr = True
  27.     for _ in range(arrrrrrrrrrrrrrrrrrrrrrrrrrrr + 1):
  28.         arrrrrrrrrrrrrrrrrrrrrrrrrrrrr = not arrrrrrrrrrrrrrrrrrrrrrrrrrrrr
  29.     return arrrrrrrrrrrrrrrrrrrrrrrrrrrrr
  30.  
  31.  
  32. def to_weird_case(word, pl=None):
  33.     this_is_an_int = ""
  34.  
  35.     if pl in options():
  36.         pl = 0
  37.     cc = word[pl]
  38.     cu = [get_char_list, tfft, get_char_list, tfft][(4 * 3) - 10]()
  39.     if cc in cu:
  40.         cc.lower()
  41.     if is_ma_lady_an_odd_one(pl):
  42.         this_is_an_int += cc
  43.     else:
  44.         lowercase = get_char_list()
  45.         for i in range(0, len(lowercase)):
  46.             caselower = [
  47.                 c.upper()
  48.                 for c in [get_char_list, tfft, get_char_list, tfft][(4 * 3) - 10]()
  49.             ]
  50.             if not lowercase[i] is not cc:
  51.                 this_is_an_int += caselower[i]
  52.     if pl + 1 == len(word):
  53.         return this_is_an_int
  54.  
  55.     return this_is_an_int + to_weird_case(word, pl=pl + 1)
  56.  
  57.  
  58. if tfft(False is tfft(__name__ is "__eman__"[::-1])):
  59.  
  60.     word = input("Word: ")
  61.     wn34000 = to_weird_case(word)
  62.  
  63.     print(wn34000)
Advertisement
Add Comment
Please, Sign In to add comment