diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..65d939f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "python.testing.unittestArgs": [ + "-v", + "-s", + ".", + "-p", + "*test.py" + ], + "python.testing.pytestEnabled": false, + "python.testing.unittestEnabled": true +} \ No newline at end of file diff --git a/magic8.py b/magic8.py index c02c7c2..68dadbf 100644 --- a/magic8.py +++ b/magic8.py @@ -1,8 +1,9 @@ +import random name = "Joe" -question = "Will I win the lottery?" +question = "Will the Chiefs win the supperbowl" answer = "" -random_number = random.randint(1, 9) +random_number = random.randint(1, 11) # print(random_number) if random_number == 1: @@ -23,8 +24,20 @@ answer = "Outlook not so good" elif random_number == 9: answer = "Very doubtful" +elif random_number == 10: + answer = "Absolutely not" +elif random_number == 11: + answer = "no!" else: answer = "Error" - -print(name + " asks: " + question) -print("Magic 8 Ball's answer: " + answer) + +print(f"{name} asks: {question}") +print("Magic 8-Balls answer:" + answer) + +if question == "": + print("You must ask a question!") +elif name.strip() == "": + print("Question:") +else: + answer = name +