1. 숫자형
2. 문자열 ex) 혼자 그냥 해본거
This commit is contained in:
31
ex) Test.py
Normal file
31
ex) Test.py
Normal file
@@ -0,0 +1,31 @@
|
||||
print("goodbye world!")
|
||||
|
||||
# 와우 언빌리버블
|
||||
for i in range(3): print(12)
|
||||
|
||||
# 함수
|
||||
def hello(name):
|
||||
print("""Hello!
|
||||
Welcome to Codeit""" + name)
|
||||
|
||||
# 함수 호출
|
||||
hello("chris")
|
||||
hello("zz")
|
||||
hello("hell")
|
||||
|
||||
# 함수
|
||||
def print_sum(a, b):
|
||||
print(a + b)
|
||||
print(a - b)
|
||||
print(a * b)
|
||||
print(a / b)
|
||||
|
||||
# 함수 호출
|
||||
print_sum(10, 2)
|
||||
|
||||
# 형변환
|
||||
a = int(10);
|
||||
b = int(3);
|
||||
|
||||
print(a * b);
|
||||
print(10 * 3);
|
||||
Reference in New Issue
Block a user