about 1/4 morse alphabet defined
This commit is contained in:
parent
17950325f3
commit
91b8982554
29
main.py
29
main.py
@ -90,18 +90,41 @@ def decode_morse():
|
|||||||
global morse
|
global morse
|
||||||
dm_a = [".","-"]
|
dm_a = [".","-"]
|
||||||
dm_b = ["-",".",".","."]
|
dm_b = ["-",".",".","."]
|
||||||
|
dm_c = ["-",".","-","."]
|
||||||
|
dm_d = ["-",".","."]
|
||||||
dm_e = ["."]
|
dm_e = ["."]
|
||||||
|
dm_f = [".",".","-","."]
|
||||||
|
dm_g = ["-","-","."]
|
||||||
|
dm_h = [".",".",".","."]
|
||||||
dm_i = [".","."]
|
dm_i = [".","."]
|
||||||
|
dm_j = [".","-","-","-"]
|
||||||
dm_s = [".",".","."]
|
dm_s = [".",".","."]
|
||||||
if morse == dm_e:
|
dm_o = ["-","-","-"]
|
||||||
print ("E")
|
#
|
||||||
if morse == dm_a:
|
if morse == dm_a:
|
||||||
print ("A")
|
print ("A")
|
||||||
|
if morse == dm_b:
|
||||||
|
print ("B")
|
||||||
|
if morse == dm_c:
|
||||||
|
print ("C")
|
||||||
|
if morse == dm_d:
|
||||||
|
print ("D")
|
||||||
|
if morse == dm_e:
|
||||||
|
print ("E")
|
||||||
|
if morse == dm_f:
|
||||||
|
print ("F")
|
||||||
|
if morse == dm_g:
|
||||||
|
print ("G")
|
||||||
|
if morse == dm_h:
|
||||||
|
print ("H")
|
||||||
if morse == dm_i:
|
if morse == dm_i:
|
||||||
print ("I")
|
print ("I")
|
||||||
|
if morse == dm_j:
|
||||||
|
print ("J")
|
||||||
if morse == dm_s:
|
if morse == dm_s:
|
||||||
print ("S")
|
print ("S")
|
||||||
|
if morse == dm_o:
|
||||||
|
print ("O")
|
||||||
|
|
||||||
|
|
||||||
def process_morse():
|
def process_morse():
|
||||||
|
Loading…
Reference in New Issue
Block a user