Skip to content

Commit 1ca86d0

Browse files
committed
fix: 버그 수정
1 parent 9420105 commit 1ca86d0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/lotto/main.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ def check_amount(input_amount):
1717

1818
def prompt_purchase_amount():
1919
"""로또 구입 금액 입력"""
20-
while True:
21-
try:
22-
print("구입금액을 입력해 주세요.")
23-
amount = input()
24-
return check_amount(amount)
25-
except ValueError as error:
26-
print(f"[ERROR] {error}")
20+
print("구입금액을 입력해 주세요.")
21+
amount = input()
22+
return check_amount(amount)
23+
2724

2825

2926
def print_lotto_tickets(tickets):
@@ -123,4 +120,4 @@ def main():
123120

124121

125122
if __name__ == "__main__":
126-
main()
123+
main()

0 commit comments

Comments
 (0)