title: ValueError: could not convert string to float:
body: <p>I use this statement twice in my program. The second time it fails. </p>
  
  <pre><code>output=""
  pitcherName=input("Enter name of the next contestant, or nothing to quit: ")
  pitcherTime=input("Enter time for " +str(pitcherName)+ " in milliseconds: ")
  highestSpeed=pitcherTime
  lowestSpeed=pitcherTime
  fastestPitcher=pitcherName
  slowestPitcher=pitcherName
  while pitcherName!="":
      pitcherName=input("Enter name of the next contestant, or nothing to quit: ")
      pitcherTime=float(input("Enter time for " +str(pitcherName) +" in milliseconds: "))
      pitcherSpeed=round(40908/pitcherTime, 2)
      output=output +str(pitcherName)+ "\t" +str(round(pitcherTime, 2)) + "\t"  +str(round(pitcherSpeed, 2)) + "\n"
      if fastestPitcher==pitcherName and pitcherSpeed&gt;highestSpeed:
          fastestPitcher=pitcherName
          highestSpeed=pitcherSpeed
      elif slowestPitcher==pitcherName and pitcherSpeed&gt;lowestSpeed:
          slowestPitcher=pitcherName
          lowestSpeed=pitcherSpeed
  print("Name" + "\t" +"Time" +"\t" +"Speed" + "\n" + "===========================" + "\n")
  print(output)
  print("Slowest pitcher was " +str(slowestPitcher) +" at " +str(round(lowestSpeed, 2)) +" miles per hour")
  print("Fastest pitcher was " +str(fastestPitcher) +" at " +str(round(highestSpeed, 2)) +" miles per hour")
  exit=input("Press nothing to`enter code here` exit")
  </code></pre>
  
  <p>Error received: </p>
  
  <pre><code>pitcherTime=float(input("Enter time for " +str(pitcherName) +" in milliseconds: "))
  ValueError: could not convert string to float: 
  </code></pre>
  
  <p>I know this may be a basic question, but I'd like to know why it worked outside of the <code>while</code> loop, but not inside of it. Is it not required to convert to float after is has been done already? </p>