Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 기타 연주
- SSH
- YOLO
- 오류
- error
- 컨테이너
- C
- Linux
- LIST
- 핑거스타일
- mysql
- Python
- 프로그래머스
- Selenium
- Visual Studio
- pandas
- label
- paramiko
- VS Code
- ubuntu
- windows forms
- Numpy
- pip
- Docker
- pytorch
- C++
- 채보
- C#
- JSON
- OpenCV
Archives
- Today
- Total
목록while (1)
기계는 거짓말하지 않는다
Python 반복문
반복문 - 프로그램 내에서 같은 명령을 특정 횟수만큼 반복하는 명령문 중첩 반복문도 가능하며 들여쓰기에 주의 while """ (사용 문법) while 조건: 실행할 명령 """ sum = 0 i = 1 n = int(input('1 ~ n 까지의 합. n입력: ')) while i < n + 1: sum += i i += 1 print('1 ~ {} 까지의 합: {}'.format(n, sum)) do while 문은 없다. for """ (사용 문법) for 변수 in 시퀀스: 실행할 명령 """ sum = 0 n = int(input('1 ~ n 까지의 합. n입력: ')) """ range 함수는 다양하게 사용 가능 1. range(end) 0 부터 end - 1 까지의 연속된 정수로 구성된 시퀀..
Python
2021. 6. 26. 22:15