Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import math
  2. x1 = int(input("Enter first number:"))
  3. x2 = int(input("Enter second number:"))
  4. print(" x", " y")
  5. for x in range(x1, x2):
  6. formula = math.sqrt(x * x + 3 * x - 500)
  7. if formula < 0:
  8. print("square root cant be negative")
  9. print(x, round(formula, 2))
  10.  
  11. x y
  12. 15 ***
  13. 16 ***
  14. 17 ***
  15. 18 ***
  16. 19 ***
  17. 20 ***
  18. 21 2.00
  19. 22 7.07
  20. 23 9.90
  21. 24 12.17
  22. 25 14.14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement