我在运行我的代码时遇到这种错误,但我不明白这是什么意思
Traceback (most recent call last):
File "/home/main.py", line 27, in <module>
dataCheck(data);
File "/home/main.py", line 24, in dataCheck
values=data();
TypeError: 'tuple' object is not callable
这是我写的代码:
print("Welcome to the game!");
def data():
name=input("Give me your name: ");
lname=input("Give me your last name: ");
age=int(input("Give me your age: "));
return (name,lname,age);
def dataCheck(data):
name=data[0];
lname=data[1];
age=str(data[2]);
print("Your name: "+name);
print("Your Last name: "+lname);
print("Your age: "+age);
yn=input("The information are true Y/N :");
if yn.lower()=="y":
print("Welcome "+name);
elif yn.lower()=="n":
values=data();
dataCheck(values);
data=data();
dataCheck(data);
繁华开满天机
摇曳的蔷薇
喵喵时光机
相关分类