반응형
모든 프로그래밍 언어는 입력 - 과정 - 출력 위주로 익히는 것이 좋다.
Python's input - Process - output : keyboard - Process - monitor
name = input('name :')
message ='hi, '+name+' ....bye, '+name+'.'
print(message)
Python PYPI(Python Package Index) :
Repository of software fot the Python programming language
:: 파이썬으로 만들어진 패키지를 저장하고 검색할 수 있는 데이터베이스의 개념
내가 만든 패키지를 pypi에 업로드하면 다른 사람들이 pip 명령어를 통해 해당 패키지를 설치할 수 있기도 하다.
예) Pandas >> pip install pandas 명령어로 설치할 수 있다.
python3 -m install pandas > 명령어가 더욱 추천되는 설치 방법
Python Comparision Operator 파이썬 비교연산자
비교 연산을 위한 데이터 타입 Boolean = 참 True + 거짓 False
KeyPoint : True / False 를 언제 사용할 것이
print('1 == 1', 1 == 1)
print('1 == 2', 2 == 1)
print('1 < 2', 1 < 2)
print('1 > 2', 1 > 2)
print('1 >= 1', 1 >= 1)
print('2 >= 1', 2 >= 1)
print('1 != 1', 1 != 1)
print('2 != 1', 2 !=1 )
Flow Control 제어문 = 조건문(Conditinal) + 반복문(Loop)
Conditinoal Statement
- if boolean : code
- if boolean : code
else : code
# 012
print(0)
if True:
print(1)
print(2)
# 02
print('-----')
print(0)
if False:
print(1)
print(2)
기본 조건문 사용하기 : if boolean : code
input_id = input('id :')
id = 'name'
if input_id == id:
print('Welcome')
반응형
'넓은 IT 이야기' 카테고리의 다른 글
[jQuery + Javascript] 입력한 글자 alert 얼럿 띄우기 (0) | 2022.01.24 |
---|---|
파이썬 jinja2.exceptions.TemplateNotFound 오류 해결 (1) | 2022.01.13 |
Ajax로 환율 api 적용해 페이지 나타내기 (0) | 2022.01.03 |
Ajax 기본 사용 방법 & OpenAPI 이용해 실시간 값 가져오기 (0) | 2022.01.01 |
자바스크립트 JavaScript 함수, 변수, 자료형 (0) | 2021.12.31 |