day 1-5 python (복합)

2023. 2. 20. 16:02개인적인 공부/Python

조건

 

#1. Create a greeting for your program. : 프로그램에 환영인사말 넣어라

#2. Ask the user for the city that they grew up in. : 어디서 자랐는지 물어라

#3. Ask the user for the name of a pet. : 애완동물 이름을 물어라

#4. Combine the name of their city and pet and show them their band name.

: 도시와 동물이름을 합쳐서 밴드 이름으로 보여라

#5. Make sure the input cursor shows on a new line : 입력은 다음줄에

#1. Create a greeting for your program.
print("Welcome to the Band Name Generator")
#2. Ask the user for the city that they grew up in
question1 = input("which city did you grew up in? \n")
#3. Ask the user for the name of a pet.
question2 = input("what is your pet name? \n")
#4. Combine the name of their city and pet and show them their band name.
print("Your band name could be " + question1 + " " + question2)

#5. Make sure the input cursor shows on a new line: