func_code: def weird_case(n):
      A = ' '
      a = []
      line = n.strip('\n').split(A)
      i = 0
      while i < len(line):
          word = line[i]
          x = 0
          while x < len(word):
              a.append(word[x])
              x = x + 1
          a.append(A)
          i = i + 1
      del a[len(a) - 1]
      x = 0
      i = 0
      while i < len(a):
          if a[i] != A:
              x = x + 1
          elif x == 0 or x % 2 == 0:
              a[i] = str(a[i].upper())
          i = i + 1
      print(''.join(a).strip)