diff --git a/dictionary.py b/dictionary.py new file mode 100644 index 0000000..568653b --- /dev/null +++ b/dictionary.py @@ -0,0 +1,23 @@ +from fileinput import close + +words = set() + +def check(word): + if word.lower() in words: + return True + else: + return False + +def load(dictionary): + file = open(dictionary, "r") + for line in file: + word = line.rstrip() + words.add(word) + close(file) + return True + +def size(): + return len(words) + +def unload(): + return True \ No newline at end of file diff --git a/hello.py b/hello.py index b536a14..4aa6b97 100644 --- a/hello.py +++ b/hello.py @@ -1,2 +1,4 @@ -answer = input("What's your name? ") +from cs50 import get_string + +answer = get_string("What's your name? ") print(f"Hello {answer}!") \ No newline at end of file