title: Program to convert decimal to binary and binary to decimal?
body: <p>So I am meant to write a program that will convert a decimal to a binary and then another that will do the opposite. I know there are python functions to do this, but I think we are meant to do it the longer way. The pseudocode goes like this: </p>
  
  <p>Decimal to Binary:</p>
  
  <pre><code>number = Prompt user for input, convert to int
  
  Set quotient equal to number, remainder equal to zero
  
  while(number!=0)
  
       (quotient,remainder)=divmod(quotient,2)
  
       print(remainder)
  </code></pre>
  
  <p>Binary to Decimal</p>
  
  <pre><code>number=Prompt user for input
  
  Get string length of number = n
  
  for x in range(n)
  
     sum+=(2^n) times x
  
  print sum
  </code></pre>
  
  <p>Any help?</p>