title: Printing all the value of perfect squares before the inputted number
body: <pre><code>number = int(input("Please enter a positive number? "))
  if number &gt;= 0:
      for i in range(1, number + 1):
          perfect_squares = i**2
          print(perfect_squares, end=" ")
  elif number &lt; 0:
      print("Error: you entered a negative number")
  </code></pre>
  
  <p>If I input the number 10 for example, I want it to output "1 4 9" right now it is outputting all of the perfect squares from 1 to 10.</p>
  
  <p>How to a end the loop to only do the numbers up to the inputted number?</p>