MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / engine

Function engine

hashes/enigma_machine.py:30–40  ·  view source on GitHub ↗
(input_character)

Source from the content-addressed store, hash-verified

28
29
30def engine(input_character):
31 target = alphabets.index(input_character)
32 target = gear_one[target]
33 target = gear_two[target]
34 target = gear_three[target]
35 target = reflector[target]
36 target = gear_three.index(target)
37 target = gear_two.index(target)
38 target = gear_one.index(target)
39 code.append(alphabets[target])
40 rotator()
41
42
43if __name__ == "__main__":

Callers 1

enigma_machine.pyFile · 0.85

Calls 2

rotatorFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected