NP62 运动会双人项目
my_tuple=(input(),input())
print(my_tuple)
NP63 修改报名名单
entry_form=('Niuniu','Niumei')
print(entry_form)
try:
entry_form[1]='Niukele'
except TypeError:
print("The entry form cannot be modified!")
NP64 输出前三同学的成绩
my_tuple=tuple(input().split())
print(my_tuple[0:3])
NP65 名单中出现过的人
my_tuple=tuple(['Tom', 'Tony', 'Allen', 'Cydin', 'Lucy', 'Anna'])
print(my_tuple)
name=input()
for i in my_tuple:
if i==name:
print("Congratulations!");break
else:
print("What a pity!")
NP66 增加元组的长度
my_tuple1=tuple(range(1,6))
print(my_tuple1)
print(len(my_tuple1))
my_tuple2=tuple(range(6,11))
print(my_tuple1+my_tuple2)
print(len(my_tuple1+my_tuple2))