Untitled
Anonymous
plain_text
04/08/2026 4:09 PM
788 B
14
Indexable
#Multi-level system status Evaluator
#User Input
V = float(input("Input voltage: "))
I = float(input("Input Current: "))
T = float(input("Input Temperature: "))
#Decisions
#Critical Condition
if V < 0 and I < 0 and T < 0:
print("INVALID INPUT")
#Danger Condition
elif V > 240 or I > 10 or T > 80:
print("DANGER")
#Warning Condition
elif 200 <= V <= 240 and 5 <= I <= 10 and 50 <= T <= 80:
print("WARNING")
#Normal Condition
elif 0 <= V < 200 and 0 <= I < 5 and 0 <= T < 50:
print("NORMAL")
#Print otherwise
else:
print("UNDEFINED STATE")
Editor is loading...
Leave a Comment