Skip to content

Commit

Permalink
They added match at 3.10...
Browse files Browse the repository at this point in the history
  • Loading branch information
1Git2Clone committed Jun 9, 2024
1 parent d580086 commit 0ee5e2d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions CurrencyConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,19 @@ def save_and_exit(output: OutputJSON):
sep="",
)
choice: str = input()
match choice:
case "1":
break
case "2":
quit(0)
case _:
print("Please make a correct choice.")
# match choice:
# case "1":
# break
# case "2":
# quit(0)
# case _:
# print("Please make a valid choice.")
if choice == "1":
break
elif choice == "2":
quit(0)
else:
print("Please make a valid choice.")

with open(output_file_path, "w") as output_file:
json.dump(
Expand Down

0 comments on commit 0ee5e2d

Please sign in to comment.