所以时间。睡觉不起作用。我使用的是python3.4.3,在我的3.6版计算机上没有出现过这个问题。在
这是我的代码:
import calendar
def ProfileCreation():
Name = input("Name: ")
print("LOADING...")
time.sleep(1)
Age = input("Age: ")
print("LOADING...")
time.sleep(1)
ProfileAns = input("This matches no profiles. Create profile? ")
if ProfileAns.lower == 'yes':
print("Creating profile...")
elif ProfileAns.lower == 'no':
print("Creating profile anyway...")
else:
print("yes or no answer.")
ProfileCreation()
ProfileCreation()
您可能希望}没有实际定义,只需将导入添加到代码的顶部,这样就可以修复它。在
import time
,因为目前{改为:
在您的导入语句中,您已经导入了日历,您还应该导入时间。睡眠在时间套餐内。 导入日历 导入时间
相关问题 更多 >
编程相关推荐