mirror of
https://github.com/Lyxminxx/binarian.git
synced 2026-10-11 12:51:48 +02:00
Initial commit
This commit is contained in:
commit
169e85b5fa
11 files changed
+107
No files matched your search
@@ -0,0 +1,25 @@
|
||||
from alphabet import alphabet
|
||||
from os import system, name
|
||||
|
||||
|
||||
def binarian(word):
|
||||
wordBin = ""
|
||||
word = word.lower()
|
||||
for letter in word:
|
||||
if letter in alphabet.keys():
|
||||
wordBin += alphabet[letter]
|
||||
elif letter == " ":
|
||||
wordBin += " "
|
||||
else:
|
||||
wordBin += letter
|
||||
return wordBin
|
||||
|
||||
def clear():
|
||||
|
||||
# for windows
|
||||
if name == 'nt':
|
||||
_ = system('cls')
|
||||
|
||||
# for mac and linux(here, os.name is 'posix')
|
||||
else:
|
||||
_ = system('clear')
|
||||
Reference in new issue
Block a user