From 6c967292b01b1dde301cd8d607b93a50f0712c32 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 6 May 2020 17:23:41 +0200 Subject: Renamed to courses and use course selection Signed-off-by: Olivier Gayot Signed-off-by: Olivier Gayot --- very.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 very.py (limited to 'very.py') diff --git a/very.py b/very.py deleted file mode 100644 index ed56487..0000000 --- a/very.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - -import json -import random - - -def main(): - dictionary = json.load(open("dict.json", mode="r", encoding="utf-8")) - - correct = 0 - for counter, (question, answer) in enumerate(random.sample(dictionary, len(dictionary))): - print(f"Very {question} -> ", end="") - try: - user_input = input() - except EOFError: - break - if user_input.lower() == answer.lower(): - print("Correct!") - correct += 1 - else: - print(f"Wrong! The answer was {answer}") - - - print(f"Result: {correct}/{counter}") - - -if __name__ == "__main__": - main() -- cgit v1.2.3