개발공부/Python

파이썬으로 밴드 이름 만들기

ssoyxon 2023. 1. 19. 14:23

 

#1. 사용자들에게 인사한다.
print("Welcome to the Band Name Generator.")
#2. 자라온 도시를적는다. 
city = input("What's name of the city you grew up in?\n")
#3. 키우는 애완동물의 이름을 적는다. 
pet = input("What's your pet's name?\n")
#4. 자라온 도시와 반려동물 이름을 합친다. 
print("Your band name could be " + city + " " + pet)

사용된 함수: print, input