title: Python how to multiply results from input strings
body: <p>I'm a programming beginner trying to learn Python. I'm trying to complete the following exercise:</p>
  
  <blockquote>
    <p>Write a program to prompt the user for hours and rate per hour to
    compute gross pay.</p>
  </blockquote>
  
  <p>Here's what I came up with:</p>
  
  <pre><code>hours = input("Enter number of hours worked\n")
  rate = input("Enter pay rate per hour\n")
  print(hours * rate)
  </code></pre>
  
  <p>Of course, I receive the error:</p>
  
  <pre><code>TypeError: can't multiply sequence by non-int of type 'str'
  </code></pre>
  
  <p>How can I tell Python that the results of the input should be regarded as integers rather than strings?</p>