title: checking for decimal points using a while loop
body: <p>I wrote some code to check if two input variables contained decimal points as so:</p>
  
  <pre><code>while "." in n:
      print()
      print("Please enter only integer numbers")
      n = input("Please enter the numerator:")
      d = input("Please enter the denominator:")
  
  while "." in d:
      print()
      print("Please enter only integer numbers")
      n = input("Please enter the numerator:")
      d = input("Please enter the denominator:")
  </code></pre>
  
  <p>however, I need a way for these loops to be ignored if the decimal is followed by a 0, e.g. 4.0 or 8.0. </p>
  
  <p>Is there a way to do this, or is there a better way to check if the number entered is a decimal? I don't want to make the input a float from the beginning as it also needs to work if the user enters an integer. </p>
  
  <p>The version of python I'm using is 3.5.4.</p>