2026fa_cse160/lecture20261027/if01.py

13 lines
242 B
Python

# Inputs to the program
length = input("Enter a value for the Length ")
length = float(length)
if length <= 0:
print("Length cannot be negative or zero.")
print("Program terminates here\n")
exit()
print(f"length = {length}")