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)