Initial commit

This commit is contained in:
Lyx committed 2025-03-20 19:16:37 +01:00
commit 169e85b5fa
11 files changed
+107

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
from wordlist import words
import random
from os import system, name
from functions import binarian
from functions import clear
def norToBin(level):
wordsInLevel = []
for word, word_level in words.items():
if word_level == level:
wordsInLevel.append(word)
word = random.choice(wordsInLevel)
correctTranslation = binarian(word)
print(f'Translate {word} into binary!')
userIn = input("Write anwser\n>")
clear()
if userIn == correctTranslation:
print(f'Yes the word {word} does translate to {userIn}!')
else:
print(f'No, the word {word} translates to {correctTranslation}. Better study some more!')
norToBin(2)