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

@@ -2,7 +2,7 @@ from math import sqrt
from random import randint
def introduction():
def introduction() -> None:
print(
"""The object of this game is to find 4 mugwumps
hidden on a 10*10 grid. Homebase is position 0,0.
@@ -38,7 +38,7 @@ def calculate_distance(guess, mugwump):
return d
def play_again():
def play_again() -> None:
print("THAT WAS FUN! LET'S PLAY AGAIN.......")
choice = input("Press Enter to play again, any other key then Enter to quit.")
if choice == "":