جواب «Risk Advice» چالش 4 از جلسهی 5
سؤال
همان سه سؤال را بپرس و امتیاز را بساز. بعد: اگر امتیاز 0 بود چاپ کن looks ok, but stay alert؛ اگر 2 بود be careful: ask an adult؛ اگر بیشتر بود STOP: this is a scam. Tell an adult.
راهنما
if score == 0: ... elif score == 2: ... else:.
یک جواب درست
score = 0
a = input()
b = input()
c = input()
if a == "yes":
score = score + 2
if b == "yes":
score = score + 2
if c == "yes":
score = score + 2
if score == 0:
print("looks ok, but stay alert")
elif score == 2:
print("be careful: ask an adult")
else:
print("STOP: this is a scam. Tell an adult.")
اول خودت امتحان کن؛ جوابهای دیگر هم قبول است. برگرد و خودت حلش کن