From 7cc578d80ceb7f03a13757c8267403559e52a2d0 Mon Sep 17 00:00:00 2001 From: "Jasper Dahil (dahilj)" Date: Wed, 1 Nov 2017 11:20:58 +0000 Subject: [PATCH] removed the part where the program asks if the user's first word is a greeting - [Subject to changes] --- Get_Functions.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/Get_Functions.py b/Get_Functions.py index aeaa8d2..7e7c548 100644 --- a/Get_Functions.py +++ b/Get_Functions.py @@ -1,5 +1,5 @@ import random -from DataAPI import getQuestion, getCategories +from DataAPI import getQuestion, opentDBCat greetings = ["hi","hello","hey","sup","howdy","henlo","waddup","wassup","heyo","hiya"] @@ -41,29 +41,16 @@ def getName(sentence): foundWord = True if foundWord == False: userName = userName + userWords[i] + " " - - #ask the user if their first word is a greeting - if userWords[0] not in greetings: - while True: - newGreeting = input('Is your first word a greeting, like "Hello"? \n').lower() - if newGreeting == "yes": - greetings.append(userWords[0]) - break - elif newGreetings == "no": - break - else: - print("Please, type in 'yes' or 'no' \n") - - return userName #this is the found name + return userName #this is the found name #========================================================================================================= def getQuestion(): """just call this ... I guess, if you want questions ... (need some revision)""" - cats = getCategories(True) + cats = opentDBCats(True) print("--- Categories ---") for i in range(3): - print(cats) + print(random.choice(cats)) userInput = input("Please, pick a subject: \n").casefold()