Skip to content

Commit

Permalink
파이썬공부
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Feb 2, 2021
1 parent fcb5a8f commit 89a20ad
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions basic/0_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
print("Ctrl + F5 : 실행")
print("%s + 연결합니다 + %s" % ("첫번째 인자값", "두번째 인자 값"))
print("%s + 그리고 + %s + 그리고 + %s" % ("첫번째 인자값", "두번째 인자값", "세번째 인자값"))


23 changes: 23 additions & 0 deletions basic/1_variable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'''
문단주석
'''

# int 는 숫자
stock_price = 5000
print("stock_price : %s" % stock_price)
print(type(stock_price))

# float 소수점을 가진 숫자!
stock_earning = 3.7
print("stock_earning : %s" % stock_earning)
print(type(stock_earning))

# str 은 문자
stock_name = "문자입니다."
print("stock_name : %s" % stock_name)
print(type(stock_name))

# bool (true,false)
stock_boolean = True
print("stock_boolean : %s" % stock_boolean)
print(type(stock_boolean))
18 changes: 18 additions & 0 deletions basic/2_math.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'''
덧셈, 뺄셈, 곱셈, 나눗셈
'''

#int 더하기
stock_price1 = 1000
stock_price2 = 2000

stock_price_total = stock_price1 + stock_price2
print("%s" % stock_price_total)

#int 빼기
stock_price_minus1 = stock_price1 - stock_price2
print("%s" % stock_price_minus1)

#int 곱하기
stock_price_multiple = stock_price1 * stock_price2
print("%s" % stock_price_multiple)

0 comments on commit 89a20ad

Please sign in to comment.