mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-01 00:41:09 +00:00
Merge pull request #325 from cclauss/patch-5
Properly define raw_input() in Python 3
This commit is contained in:
commit
ee92291249
|
@ -2,10 +2,9 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
try:
|
try:
|
||||||
raw_input
|
input = raw_input # Python 2
|
||||||
input = raw_input
|
except NameError:
|
||||||
except:
|
pass # Python 3
|
||||||
pass
|
|
||||||
|
|
||||||
# Chaos Machine (K, t, m)
|
# Chaos Machine (K, t, m)
|
||||||
K = [0.33, 0.44, 0.55, 0.44, 0.33]; t = 3; m = 5
|
K = [0.33, 0.44, 0.55, 0.44, 0.33]; t = 3; m = 5
|
||||||
|
@ -101,7 +100,7 @@ for chunk in message:
|
||||||
inp = ""
|
inp = ""
|
||||||
|
|
||||||
# Pulling Data (Output)
|
# Pulling Data (Output)
|
||||||
while inp != "e" and inp != "E":
|
while inp in ("e", "E"):
|
||||||
print("%s" % format(pull(), '#04x'))
|
print("%s" % format(pull(), '#04x'))
|
||||||
print(buffer_space); print(params_space)
|
print(buffer_space); print(params_space)
|
||||||
inp = input("(e)exit? ")
|
inp = input("(e)exit? ").strip()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user