You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A boolean data type represents one of the two values: _True_ or _False_. The use of these data types will be clear once we start using the comparison operator. The first letter**T**for True and **F**for False should be capital unlike JavaScript.
34
-
**Example: Boolean Values**
33
+
불리언 데이터 타입은 True 또는 False 두 값 중 하나를 나타냅니다. 비교 연산자를 사용하면 이 데이터 타입의 사용이 명확해질 것입니다. 첫 번째 문자**T**는 참, **F**는 거짓으로 표현되는 자바 스크립트와 달리 대문자여야 합니다.
34
+
**예시: 불리언 값**
35
35
36
36
```py
37
37
print(True)
38
38
print(False)
39
39
```
40
40
41
-
## Operators
41
+
## 연산자
42
42
43
-
Python language supports several types of operators. In this section, we will focus on few of them.
43
+
파이썬은 몇 가지 타입의 연산자를 지원합니다. 이 섹션에서 이것에 대해 알아볼 것입니다.
44
44
45
-
### Assignment Operators
45
+
### 대입 연산자
46
46
47
-
Assignment operators are used to assign values to variables. Let us take = as an example. Equal sign in mathematics shows that two values are equal, however in Python it means we are storing a value in a certain variable and we call it assignment or a assigning value to a variable. The table below shows the different types of python assignment operators, taken from [w3school](https://www.w3schools.com/python/python_operators.asp).
47
+
대입 연산자는 변수에 값을 대입할 때 사용됩니다. = 로 예시를 들어보겠습니다. 수학에서 등호란 두 값이 동일하다는 것을 의미하지만, 파이썬에서는 특정 변수가 값을 가지고 있으며, 이 변수에 값을 대입한다고 합니다. 아래 표는 [w3school](https://www.w3schools.com/python/python_operators.asp)에서 가져온 다양한 유형의 파이썬 할당 연산자를 보여줍니다.
Let's declare a variable and assign a number data type. I am going to use single character variable but remember do not develop a habit of declaring such types of variables. Variable names should be all the time mnemonic.
97
+
변수를 선언하고 숫자 데이터 유형을 지정합니다. 여기서는 단일 문자 변수를 사용할 것이지만, 이런 유형의 변수를 선언하는 습관은 좋지 않다는 것을 기억하셔야 합니다. 변수 이름은 항상 기억해야 합니다.
98
98
99
99
**Example:**
100
100
101
101
```python
102
-
#Declaring the variable at the top first
102
+
#첫 번째로 변수를 먼저 선언합니다.
103
103
104
-
a =3#a is a variable name and 3 is an integer data type
105
-
b =2#b is a variable name and 3 is an integer data type
104
+
a =3#a는 변수의 이름이며 정수 데이터 타입입니다.
105
+
b =2#b는 변수의 이름이며 정수 데이터 타입입니다.
106
106
107
-
#Arithmetic operations and assigning the result to a variable
107
+
#산술 연산 및 결과를 변수에 대입합니다.
108
108
total = a + b
109
109
diff = a - b
110
110
product = a * b
@@ -113,8 +113,8 @@ remainder = a % b
113
113
floor_division = a // b
114
114
exponential = a ** b
115
115
116
-
#I should have used sum instead of total but sum is a built-in function - try to avoid overriding built-in functions
117
-
print(total) #if you do not label your print with some string, you never know where the result is coming from
116
+
# sum 대신 total을 사용했어야 하지만 sum은 내장 함수입니다. 내장 함수를 재정의하지 않도록 하십시오.
117
+
print(total) #만약 몇몇 출력에 문자열로 표시를 하지 않는다면, 어디서 결과가 오는지 알지 못할 것입니다.
118
118
print('a + b = ', total)
119
119
print('a - b = ', diff)
120
120
print('a * b = ', product)
@@ -129,55 +129,55 @@ print('a ** b = ', exponentiation)
Let us start start connecting the dots and start making use of what we already know to calculate (area, volume,density, weight, perimeter, distance, force).
151
+
이제 점 연결을 시작하고 이미 알고 있는 계산 방법(면적, 부피, 밀도, 무게, 둘레, 거리, 힘)을 사용해 보겠습니다.
152
152
153
153
**Example:**
154
154
155
155
```py
156
-
#Calculating area of a circle
157
-
radius =10#radius of a circle
158
-
area_of_circle =3.14* radius **2#two * sign means exponent or power
156
+
#원의 넓이 계산
157
+
radius =10#원의 반지름
158
+
area_of_circle =3.14* radius **2#두 개의 * 기호는 지수를 의미합니다
159
159
print('Area of a circle:', area_of_circle)
160
160
161
-
#Calculating area of a rectangle
161
+
#직사각형의 넓이 계산
162
162
length =10
163
163
width =20
164
164
area_of_rectangle = length * width
165
165
print('Area of rectangle:', area_of_rectangle)
166
166
167
-
#Calculating a weight of an object
167
+
#개체의 무게 계산
168
168
mass =75
169
169
gravity =9.81
170
170
weight = mass * gravity
171
-
print(weight, 'N') #Adding unit to the weight
171
+
print(weight, 'N') #무게에 단위 추가
172
172
173
-
#Calculate the density of a liquid
173
+
#액체의 밀도 계산
174
174
mass =75# in Kg
175
175
volume =0.075# in cubic meter
176
176
density = mass / volume # 1000 Kg/m^3
177
177
178
178
```
179
179
180
-
### Comparison Operators
180
+
### 비교 연산자
181
181
182
182
In programming we compare values, we use comparison operators to compare two values. We check if a value is greater or less or equal to other value. The following table shows Python comparison operators which was taken from [w3shool](https://www.w3schools.com/python/python_operators.asp).
0 commit comments