[Python Bootcamp] Day1

Yul·2024년 9월 22일

Python Bootcamp

목록 보기
2/7
post-thumbnail

1. 배운 것

  • PyCharm 다운받고 프로젝트 세팅하기
  • print 함수
    • 괄호 안의 값을 콘솔에 출력한다.
  • 줄바꿈 /n, 문자열 더하기
  • input 함수
    • 괄호 안의 값을 콘솔에 출력하고 사용자가 입력할 수 있게 한다.
  • 변수
    • 같은 이름의 변수를 새로 선언하면 선언한 대로 바뀐다
  • len 함수
    • 문자의 길이를 숫자로 나타낸다.

2. 프로젝트 : 밴드명 생성기

print("Welcome to the Band Name Generator.")
city = input("What's the name of the city you grew up in?")
print(city)
pet_name=input("What's your pet's name?")
print(pet_name)
print(f"Your band name could be {city} {pet_name}")


결과창

profile
이것저것 공부하는 중

0개의 댓글