mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-05 09:39:32 -08:00
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:
@@ -67,13 +67,13 @@ questions = [
|
||||
]
|
||||
|
||||
|
||||
def print_centered(msg):
|
||||
def print_centered(msg: str) -> None:
|
||||
spaces = " " * ((64 - len(msg)) // 2)
|
||||
|
||||
print(spaces + msg)
|
||||
|
||||
|
||||
def print_instructions():
|
||||
def print_instructions() -> None:
|
||||
print("TEST YOUR KNOWLEDGE OF CHILDREN'S LITERATURE.")
|
||||
print()
|
||||
print("THIS IS A MULTIPLE-CHOICE QUIZ.")
|
||||
|
||||
Reference in New Issue
Block a user