3/3 python 공부 day 1 / day 100
개발/파이썬2023. 3. 3. 19:32
728x90
반응형
어제 결제한 해외 교육사이트 강의 1일차 .
100일 완성 과정인데 앞부분 건너뛸까 하다가 일단 차근차근 근성있게 가본다
1일차 내용은 빠르게 훑고 지나감..
오늘 한 내용만 코드 올림.
강의 외에 수업자료 등은 전부 영어라 쉽지 않다..
# 입력받은 데이터의 길이?
print(len(input("What is your name? ")))
# 변수 사용하여 응용
name = input("what is your name? ")
print (len(name))
#test a,b 위치 바꾸기
a = input("a : ")
b= input("b : ")
c = a #새로운 변수 c 를 만들어 옮기는 방식
a = b
b = c
print("a = " + a)
print("b = " + b)
# #1. Create a greeting for your program. (자란 도시이름 , 반려동물 이름 합쳐 밴드이름 생성)
print("welcome to band name generatior")
# #2. Ask the user for the city that they grew up in.
user_name = input("Which city did you gre]ow up in\n")
# #3. Ask the user for the name of a pet.
user_pet = input ("what is the name of pet ?\n ")
# #4. Combine the name of their city and pet and show them their band name.
print("Band name generating......")
# #5. Make sure the input cursor shows on a new line:
print("Band name is "+user_name,user_pet)
728x90
반응형
'개발 > 파이썬' 카테고리의 다른 글
파이썬 숫자 맞추기 게임 연습 (0) | 2023.03.05 |
---|---|
3/4 python 공부 day 2 / day 100 (0) | 2023.03.04 |
VSCODE 그래픽깨짐 , 글씨 흐려짐 (0) | 2023.02.13 |
로또 번호 추첨기 ver.2 파이썬 코드 (0) | 2023.01.15 |
날씨정보 텔레그램 봇으로 전송 파이썬 코드 (0) | 2023.01.15 |
댓글()