-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreview.py
More file actions
32 lines (25 loc) · 728 Bytes
/
review.py
File metadata and controls
32 lines (25 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
def three (num1 :int, num2 :int, bias :str) -> int:
if bias == '+':
return num1 + num2
elif bias == '-':
return num1 - num2
# num1 = int(input('숫자 1 입력:'))
# str = str(input('부호입력: '))
# num2 = int(input('숫자 2 입력:'))
# print('결과:',three(num1,num2,str))
index = 'tomatado'.find('o', 'tomatado'.find('o')+1)
print(index-1)
index2 = 'CO2 H2O'.find('2','CO2 H2O'.find('2')+1)
print(index2)
temps = [25.2, 16.8, 31.4, 23.9, 28, 22.5, 19.6]
cold = []
warm = []
temps.sort()
print(temps)
for i in range(0,len(temps)):
if int(temps[i]) <= 20:
cold.append(temps[i])
elif int(temps[i] > 20):
warm.append(temps[i])
print('clod:',cold)
print('warm:', warm)