From 7836135cf11ac79e48ea18bfc2b9bb6a757391c5 Mon Sep 17 00:00:00 2001 From: Kev Bunn <141572185+kevBunn@users.noreply.github.com> Date: Fri, 12 Sep 2025 23:36:15 +0100 Subject: [PATCH] Update magic-8-ball.py Corrected the bonus/ challenge code :- the existing code for the challenge tasks 13 and 14 was incorrect syntax. --- 2-control-flow/magic-8-ball/magic-8-ball.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/2-control-flow/magic-8-ball/magic-8-ball.py b/2-control-flow/magic-8-ball/magic-8-ball.py index bcbe1de..01d6a56 100644 --- a/2-control-flow/magic-8-ball/magic-8-ball.py +++ b/2-control-flow/magic-8-ball/magic-8-ball.py @@ -33,6 +33,10 @@ print(playerName, "\'s Question:", playerQuestion) # Challenge: -# playerName.isEmpty ? print("Question: \(playerQuestion)") : print("\(playerName) asks: \(playerQuestion)") +#if question == "": +# print("You forgot to ask a question!") +#else: +# print(f"Question: {playerQuestion}" if name == "" else f"{playerName} asks: {playerQuestion}") +# print("🎱:", playerName) -print("🎱:", eightBall) \ No newline at end of file +print("🎱:", eightBall)