From 974101096d815be53adf423530b4ee9eee79cada Mon Sep 17 00:00:00 2001 From: FitriRibbit <91612800+FitriRibbit@users.noreply.github.com> Date: Thu, 15 Sep 2022 08:10:33 -0700 Subject: [PATCH] Update email slicer.py Made some code to replay game --- email slicer.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/email slicer.py b/email slicer.py index 4e376dc..20cf62b 100644 --- a/email slicer.py +++ b/email slicer.py @@ -1,16 +1,19 @@ def main(): - print(" Welcome to the email slicer ") - print("") - email_input = input("Input your email address: ") (username, domain) = email_input.split("@") (domain, extension) = domain.split(".") - print("Username : ", username) - print("Domain : ", domain) - print("Extension: ", extension) + print("Username :" , username) + print("Domain :", domain) + print("Extension :", extension) + + print("") + replay = input("Still Wanna Play ? (y/n) ") # Ask Wanna PLay again ? Give option to continue play or not + if replay == "Y" or replay == "y": + main() + +print("Welcome to the email slicer ") +print("") - -while True: - main() +main()