Lecture code 10/27/2026
This commit is contained in:
parent
9f2a91d67d
commit
aad4e226c5
7 changed files with 152 additions and 0 deletions
13
lecture20261027/if01.py
Normal file
13
lecture20261027/if01.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
|
||||
# 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}")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue