title: How to Convert base 10 to base 2 and find the base 10 integer that denotes most consecutive 1s?
body: <p>I have been trying to convert base 10 to base 2 and finding the base 10 integer that denotes most consecutive 1s</p>
  <pre><code>if __name__ == '__main__':
      n = int(input().strip())``
      outcomes = 0
      biggest = 0
  while n &gt; 0:
      if n % 2 == 1:
         outcomes += 1
          if outcomes &gt; biggest:
              biggest = outcomes
      else:
          result = 0
  
  print(biggest)
  </code></pre>
  <p>those are my codes please correct where i'm wrong</p>