diff --git a/basic/0_test.py b/basic/0_test.py new file mode 100644 index 0000000..161ef9f --- /dev/null +++ b/basic/0_test.py @@ -0,0 +1,5 @@ +print("Ctrl + F5 : 실행") +print("%s + 연결합니다 + %s" % ("첫번째 인자값", "두번째 인자 값")) +print("%s + 그리고 + %s + 그리고 + %s" % ("첫번째 인자값", "두번째 인자값", "세번째 인자값")) + + diff --git a/basic/1_variable.py b/basic/1_variable.py new file mode 100644 index 0000000..d15e504 --- /dev/null +++ b/basic/1_variable.py @@ -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)) diff --git a/basic/2_math.py b/basic/2_math.py new file mode 100644 index 0000000..bb6f4b3 --- /dev/null +++ b/basic/2_math.py @@ -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) \ No newline at end of file