【高编作业】第八章课后题

8-2
def favorite_book(title):
	print('One of my favorite books is', title)
	
name = 'textbook'
favorite_book(name)

8-3

def make_shirt(size, word):
	print('size is:', size)
	print('word is:', word)
	
make_shirt(12,'abc')
	

8-4

def make_shirt(size = 'L', word = 'I love Python'):
	print('size is:', size)
	print('word is:', word)

make_shirt()
make_shirt('M')
make_shirt('S','abc')
	

8-6

def city_country(city, country):
	return(city + ', ' + country)
	
print(city_country('Santiago', 'Chile'))


猜你喜欢

转载自blog.csdn.net/weixin_40247273/article/details/79775791
今日推荐