为什么错了
# Enter a code
age = int(input("请输入你的年龄"))
if age < 18:
print('teenager')
else:
print('adult')# Enter a code
age = int(input("请输入你的年龄"))
if age < 18:
print('teenager')
else:
print('adult')2022-07-13
# Enter a code
# -*- coding: UTF-8 -*-
age = int(input("请输入你的年龄"))
if age < 18:
print('teenager')
else:
print('adult')之后会报另一个错误
运行失败
Traceback (most recent call last):
File "index.py", line 3, in
age = int(input("请输入你的年龄"))
EOFError: EOF when reading a line
请输入你的年龄EOFError: EOF when reading a line # 如果未向input()提供数据,则会发生EOF错误
举报