園子買了一台測謊機,想藉此試探新一對於小蘭是否有好感。
這台測謊機的運作機制會根據手掌出汗有無(1為出汗,0為無),以及心跳快慢(每分鐘高於80次則算快),藉此判斷這個人是否有說謊
輸入:手掌是否有出汗(1為出汗,0為無):1,每分鐘心跳速度:90
輸出:說謊


hand = int(input("手掌是否有出汗(1為出汗,0為無):"))
heartbeat = int(input("每分鐘心跳速度:"))
if hand == 1 and heartbeat >= 80:
print("說謊")
else:
print("沒說謊")

hand = int(input("手掌是否有出汗(1為出汗,0為無):"))
heartbeat = int(input("每分鐘心跳速度:"))
if hand == 1 and heartbeat >= 80:
print("說謊")
else:
print("沒說謊")

程式執行結果顯示:
FlowInfo1 FlowInfo2 FlowInfo3 FlowInfo4 FlowInfo5