dictionary

master
Dr. Sascha Woitschetzki 2024-03-07 09:34:02 +07:00
parent 4889d6cf47
commit e457922cd4
2 changed files with 26 additions and 1 deletions

@ -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

@ -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}!")