+import random
+
+all_words=[i.strip() for i in open("words.txt").readlines()]
+
+def get_difficulty():
+ game="fail"
+ while game!="EASY" and game != "HARD":
+ game=input("choose the difficulty easy or hard...").upper()
+ print("you have 30 seconds (45 if you picked 'hard') to memorise a grid of words. Good luck...")
+ return game == "EASY"
+
+def words_for_game(words, is_easy):
+ if is_easy:
+ return words[:10]
+ else:
+ return words[:]
+
+def print_grid(words):
+ print(words)
+
+
+# random.shuffle(words)
+# added_word=words.pop()
+# for i in range(3):
+# print(words[3*i],words[3*i+1],words[3*i+2])
+
+def play_game():
+ is_easy = get_difficulty()
+ words = words_for_game(all_words, is_easy)
+ random.shuffle(words)
+ print_grid(words)