title: Python 3: Basic arithmetic operations
body: <p>I am trying to write a program to perform simple arithmetic operations.
  I want the program to prompt the user for two numbers, and then calculate five
  results:</p>
  
  <ul>
  <li>the sum</li>
  <li>the difference</li>
  <li>the product</li>
  <li>the quotient according to both integer</li>
  <li>the floating point division.</li>
  </ul>
  
  <p>Now, I remember that in <strong>Python 2</strong>, that there was raw_input for strings and input for numbers in general.
  However, I am just learning <strong>Python 3</strong>, and input is by default a string, and for numbers I have to specify the type of number I wish to have: i.e. int(input()) or float(input()).</p>
  
  <p>So, for example, let's assume that I want to have exactly this output (using inputs 4 and 2.5):</p>
  
  <pre><code>What is the first number? 4
  What is the second number? 2.5
  The sum is 6.5
  The difference is 1.5
  The product is 8.0
  The integer quotient is 2
  The floating-point quotient is 1.6
  </code></pre>
  
  <p>I would type this code in <strong>Python 2</strong>:</p>
  
  <pre><code>x=input ("What is the first number? ")
  y=input ("What is the second number? ")
  
  print "The sum is", x+y
  print "The difference is", x-y
  print "The product is", x*y
  print "The integer quotient is", int(x)/int(y)
  print "The floating-point quotient is", float(x)/float(y)
  </code></pre>
  
  <p>However, I can't get it done in <strong>Python 3</strong>. This is the (wrong) code I am using:</p>
  
  <pre><code>x = int(input("What is the first number? "))
  y = int(input("What is the second number? "))
  
  print("The sum is: ", x+y)
  print("The difference is: ", x-y)
  print("The product is: ", x*y)
  print("The integer quotient is: ", x/y)
  print("The floating-point quotient is: ", x/y)
  </code></pre>
  
  <p>Obviously, I get an error message because my second input (y) equals 4.5, which is a <strong>float</strong> and not an <strong>int</strong> as defined by my input. I didn't bother putting float(x)/float(y) for the floating-point quotient because that would also be contradictory (thus an error).</p>
  
  <p>I could of course put float instead of int like this:</p>
  
  <pre><code>x = float(input("What is the first number? "))
  y = float(input("What is the second number? "))
  </code></pre>
  
  <p>But in this case, I will get 10.0 for my product (not 10), and my integer quotient is a float (1.6 instead of 2)</p>
  
  <p>I find it really frustrating that in Python 3 I can't ask for a general type number for input (without having to specify if it will be float or int). Therefore, I'm stuck on such simple program, and would greatly appreciate any solution/ explanation.</p>