개발자로 가는길 :: 3/3 python 공부 day 1 / day 100

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
반응형

댓글()