From c8ac86a775831b065f9bc93d5f4dec4b7e2ec5ba Mon Sep 17 00:00:00 2001 From: mubashirm1 Date: Wed, 16 Oct 2024 12:24:21 +0530 Subject: [PATCH 1/3] optimized the code --- 8-modules/39_slot_machine_2.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/8-modules/39_slot_machine_2.py b/8-modules/39_slot_machine_2.py index 6b5cb8b..7954697 100644 --- a/8-modules/39_slot_machine_2.py +++ b/8-modules/39_slot_machine_2.py @@ -20,9 +20,6 @@ def play(): if win: print('Jackpot!!! 💰') break - else: - results = random.choices(symbols, k=3) - answer = '' while answer.upper() != 'N': play() From 85757d4a9faf47dd2aaa9bd0e5ae97eb51564cdf Mon Sep 17 00:00:00 2001 From: mubashirm1 Date: Wed, 16 Oct 2024 12:31:25 +0530 Subject: [PATCH 2/3] initial commit --- 8-modules/39_slot_machine_2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/8-modules/39_slot_machine_2.py b/8-modules/39_slot_machine_2.py index 7954697..6b5cb8b 100644 --- a/8-modules/39_slot_machine_2.py +++ b/8-modules/39_slot_machine_2.py @@ -20,6 +20,9 @@ def play(): if win: print('Jackpot!!! 💰') break + else: + results = random.choices(symbols, k=3) + answer = '' while answer.upper() != 'N': play() From e9d052cc171e511cf97714bb895ceb69020bf763 Mon Sep 17 00:00:00 2001 From: mubashirm1 Date: Wed, 16 Oct 2024 12:38:40 +0530 Subject: [PATCH 3/3] optimized code --- 8-modules/39_slot_machine_2.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/8-modules/39_slot_machine_2.py b/8-modules/39_slot_machine_2.py index 6b5cb8b..7954697 100644 --- a/8-modules/39_slot_machine_2.py +++ b/8-modules/39_slot_machine_2.py @@ -20,9 +20,6 @@ def play(): if win: print('Jackpot!!! 💰') break - else: - results = random.choices(symbols, k=3) - answer = '' while answer.upper() != 'N': play()