Develop/파이썬 (Python) 4

[Python] [중급] 파이썬 예제 뽀개기 | 김왼손의 왼손코딩

https://www.youtube.com/watch?v=POOMczpRo6M&index=4&list=PLGPF8gvWLYyomy0D1-uoQHTWPvjXTjr_a 코딩도장도 해보기 Repl.It 도! #01 Say Hidef say_hi(name:str, age:int) -> str: // -> 이게 뭘까??????? return "Hi. My name is {} and I'm {} years old.".format(name, age) print(say_hi('다희', 22)) #02 Correct Sentencedef c_s(text: str) -> str: text = text[0].upper() + text[1:] if not text.endswith('.'): text += '.' return ..

[Python] [초급]유기농냠냠파이썬 | 김왼손의 왼손코딩 1-71강

https://www.youtube.com/watch?v=ikCjr8-QYAs&list=PLGPF8gvWLYypeEoFNTfSHdFL5WRLAfmmm&index=10 강의 주소 https://www.python.org/ add python 3.6 to path 체크하고 다운받기 option - configure idle - setting ! 배경바꾸기 7print(1)print(-1)print(3.14) 8 연산자1print(1 + 2)print(3 - 4)print(2 * 3)print(16 / 2) 9 연산자2 ** 제곱// 몫% 나머지print(1 ** 2) // 1print(3 // 4) // 0print(5 % 6) // 5 11 복합할당연산자+=-=*=/= 12 변수이름a = 1A = 2다른 ..

[Python] Repl.It - 입출력/나누기/올림/내림/math module

- string끼리 출력 : + # Read a string:a = input()# Print a string:print("Hello, " + a + "!") - string + int 출력 : , # Read an integer:a = int(input())# Print a value:print("The next number for the number ", a, " is ", (a + 1))print("The previous number for the number ", a, " is ", (a - 1)) - 정수 나누기 종류 print(63 / 5) : 소수점까지 나눈다print(63 // 5) : 정수까지만 나눈다print(63 % 5) : 나머지 계산 12.6123 - float# int는 무조건 ..