total = 0
coffe = 10
while True:
money = int(input("돈을 넣어주세요: "))
total = total + money
if total > 1000:
print("커피가 %d 잔 나옵니다"%(total/1000))
elif total == 1000:
print("커피가 나옵니다")
coffe = coffe - 1
total = total - 1000
elif total print(" %d 만큼 돈을 더 넣어주세요"%(1000-total))
if not coffe:
print("커피가 다떨어졋어용 ㅠ")
이렇게 쨧는뎅
5500원 넣었을때 커피가 5잔 나왓습니다 뜬다음에 남은 돈500원이 자판기 안에 남아있게 만들려면 어떻게 코딩해야됨 ??
5500원 넣고 커피 5잔 뽑고 500원 추가로 넣으면 커피한잔더 나오게 코딩못하겠쪄 ㅠㅠ
아 참고로 파이썬3임
다떵너졋어용 졸귀 ㅋㅋ -
http://gall.dcinside.com/antinatalism