-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path실험3.py
More file actions
74 lines (57 loc) · 1.45 KB
/
실험3.py
File metadata and controls
74 lines (57 loc) · 1.45 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
a = [1, 2, 3]
b = a
c=a.copy()
c.insert(3, 4)
print(a)
pocket = ['paper', 'cellphone']
if 'money' in pocket:
pass
else:
print("카드를 꺼내라")
card = False
if 'money' in pocket: print("택시를 타고가라")
elif card:
print("택시를 타고가라")
else:
print("걸어가라")
prompt = """
1. Add
2. Del
3. List
4. Quit
Enter number: """
number = 0
while number != 4:
print(prompt)
number = int(input())
if(number==1): print("Add 선택")
elif(number==2): print("Del 선택")
elif(number==3): print("List 선택")
elif(number==4): print("Quit")
else: print("잘못된 입력")
coffee = 5
while True:
print("커피를 줍니다.")
coffee-=1
print(coffee)
if(coffee==0):
print("판매 중지")
break
a = 0
while a<20:
a+=1
if(a%3==0):
continue
print(a)
coffee = 10
while coffee >0:
coffee-=1
if(coffee%2==0): continue
print("남은 커피: %d" %coffee)
print("커피 없음. 종료.")
d=0
while d<10:
d+=1
if(d%2==0): continue
print(d)
count=0