본문 바로가기
Programming

파이썬 연습(wikidox) 11~20

by 휴/Hue 2022. 5. 23.
#11
samsung = 50000
stock = 10
value = samsung * stock
print(value)

#13~20
s = "hello"
t = "python"
print(s+'!', t)

#type function
a = 128
print(type(a))

num_str = "720"
print(type(num_str))
num_int = int(num_str)
print(type(num_int), num_int+1)

num = 100
tostr = str(num)
print(tostr, type(tostr))

num2 = "15.79"
num_flo = float(num2)
print(num_flo, type(num_flo))

year = "2022"
year2 = int(year)
print(year2, type(year2))

month_cost = 48584
total = month_cost * 36
print(total)

'Programming' 카테고리의 다른 글

파이썬 연습(wikidox) 61~70  (0) 2022.05.28
파이썬 연습(wikidox) 51~60  (0) 2022.05.27
파이썬 연습(wikidox) 41~50  (0) 2022.05.26
파이썬 연습(wikidox) 31~40  (0) 2022.05.25
파이썬 연습(wikidox) 21~30  (0) 2022.05.24