Python: Add type annotations to all 'print' functions (#662)

* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
This commit is contained in:
Martin Thoma
2022-03-21 10:41:14 +01:00
committed by GitHub
parent c444da93c0
commit 1b1d50986b
50 changed files with 241 additions and 172 deletions

View File

@@ -36,8 +36,8 @@ def flip_bits(
"""
while m == n:
r = r_function(n)
n = r - int(math.floor(r))
n = int(10 * n)
n_tmp = r - int(math.floor(r))
n = int(10 * n_tmp)
if row[n] == "X":
row[n] = "O"
break
@@ -46,7 +46,7 @@ def flip_bits(
return row, n
def print_instructions():
def print_instructions() -> None:
print(" " * 32 + "FLIPFLOP")
print(" " * 15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY")
print("\n" * 2)