I have three inputs x, y and z. How do I set limits for these inputs? Also if I want x to be always greater than y, but less than z how can I do this?
while True:
try:
x, y, z = (float(i) for i in input("Please input the x(meters), y (meters), z, respectively seperated with space:").split())
except ValueError:
print("Enter values without commas!")
if x > 0:
print("X must be < 0")
if x < y or x > z:
print("x must be greater than y but less than z!")
else:
break
This code does not work correctly!