def city_country(city,country):
a = city + ', ' + country
return a
b = city_country('china','shanghai')
print(b)
b = city_country('chian','shenzhen')
print(b)
b = city_country('chian','guangzhou')
print(b)
def make_album(name,album):
singer = {'Singer_Name':name,'Music Album':album}
return singer
music = make_album('周杰伦','Jay')
print(music)
music = make_album('回音哥','回音Echo')
print(music)
music = make_album('刘德华','只知道此刻爱你')
print(music)
def make_album(name,album):
mc = name + ' ' + album
return mc
while True:
print("\n请在下方输入你喜欢的歌手和歌手的专辑名称 ")
print("输入完成后,可以再歌手货歌手专辑名称的文本框里输入'q',就能结束程序了.")
f_name = input("请输入你喜欢的歌手:")
if f_name == 'q':
break
a_album = input("请输入你喜欢的歌手专辑名称: ")
if a_album == 'q':
break
dj = make_album(f_name,a_album)
print("\n" + dj +"!")
|