title: TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'
body: <pre><code>if 1:
  T1=300
  P1=1
  h1=462
  s1=4.42
  hf=29
  sf=0.42
  print("The inlet conditions to compressor are 1atm pressure &amp; 300K")
  Wi=(T1*(s1-sf))-(h1-hf)
  P2= input("What is the final compression pressure? ")
  T2= input("What is the final compression temperature? ")
  h2= float(input("From graph, enthalpy at point 2 is "))
  s2= float(input("From graph, entropy at point 2 is "))
  y= float((h1-h2)/(h1-hf))
  W= float((T1*(s1-s2))-(h1-h2))
  Wf= float(W/y)
  FOM= float(Wi/Wf)
  print("")
  print("Yield= %f") %(y)
  print("Work reqd per unit mass of gas compressed= %f KJ/kg") %(W)
  print("Work reqd per unit mass of gas liquified= %f KJ/kg") %(Wf)
  print("Figure of Merit= %f") %(FOM)
  </code></pre>
  
  <p>The inlet conditions to compressor are 1atm pressure &amp; 300K
  What is the final compression pressure? 20
  What is the final compression temperature? 300
  From graph, enthalpy at point 2 is 432
  From graph, entropy at point 2 is 2.74</p>
  
  <p>Yield= %f
  Traceback (most recent call last):
    File "", line 19, in 
      print("Yield= %f") %(y)
  TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'</p>