일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Excel
- Apache
- Python
- string
- list
- Tkinter
- array
- Google Excel
- gas
- math
- Mac
- numpy
- PySpark
- PANDAS
- SQL
- GIT
- Google Spreadsheet
- google apps script
- Redshift
- PostgreSQL
- c#
- django
- Kotlin
- matplotlib
- Github
- Java
- hive
- dataframe
- 파이썬
- Today
- Total
목록If (5)
달나라 노트
if 조건문에 대해 알아봅시다. Syntax if (condition1) { ... do something 1 ... } else if (condition2) { ... do something 2 ... } else if (condition3) { ... do something 3 ... } ... else { ... do something n ... } if ~ else if ~ else 조건문의 형태는 위와 같습니다. 일반적인 프로그래밍 언어에서 사용하는 것과 비슷합니다. 조건문이 실행되는 순서는 가장 위에서부터 조건을 판별합니다. 1. if (condition1) ~~ condition1이 true라면 do something 1을 실행한 후 조건문을 종료합니다. (이 뒷 부분의 조건문은 실행되지 않..
C#에서 조건문은 다음과 같이 사용할 수 있습니다. if (condition1) { condition1 = True일 경우 실행될 부분 } else if (condition2) { condition2 = True일 경우 실행될 부분 } else if (condition3) { condition3 = True일 경우 실행될 부분 } else { 모든 condition이 False일 경우 실행될 부분 } else if 부분은 원하는 만큼 추가 가능합니다. else if 부분은 아예 없어도 됩니다. 실제 예시를 봅시다. using System; class MyProgram { static void Main() { int test1 = 5; if (test1
C++에서 조건문은 다음과 같이 사용할 수 있습니다. if (condition1) { condition1 = True일 경우 실행될 부분 } else if (condition2) { condition2 = True일 경우 실행될 부분 } else if (condition3) { condition3 = True일 경우 실행될 부분 } else { 모든 condition이 False일 경우 실행될 부분 } else if 부분은 원하는 만큼 추가 가능합니다. else if 부분은 아예 없어도 됩니다. 실제 예시를 봅시다. #include using namespace std; int main() { int test_1 = 5; if (test_1
Original source = www.w3schools.com Java에서의 if문은 다음과 같이 사용할 수 있습니다. public class JavaIfElse { public static void main(String args[]) { if (2 > 1) { System.out.println("2 is greater than 1."); } } } -- Result 2 is greater than 1. public class JavaIfElse { public static void main(String args[]) { int a = 1; int b = 10; if (a > b) { System.out.println("A is greater than B."); } else { System.out.pr..