私はPythonでコーディングするのが初めてです。私は年齢を入力すると、一連のテキストが印刷されるように自分のコードを作成しようとしています。しかし、私のコードは、私が行ごとに行を追う場合にのみ動作します。たとえば、2000歳以上の年齢を入力するとすぐに何も起こりません。私は Python - Basic Coding
2000を超えるprint('Please input name')
if input() == 'Alice':
print('Hi, Alice.Please input age')
if int(input()) < 12:
print('You are not Alice, kiddo.')
elif int(input()) > 2000:
print('Unlike you, Alice is not an undead, immortal vampire.')
elif int(input()) == 100:
print('You are not Alice, grannie.')
elif 12 < int(input()) < 99:
print('You are Alice!.')
すると、あなたの答えを得た場合、それを閉じて、入力を毎回繰り返して変数に代入し、変数 – PRMoureu
を比較しません。 – cSharma