mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-24 20:10:15 -08:00
Python: Add type annotations
This commit is contained in:
committed by
Alexander Wunschik
parent
b95a514e84
commit
83b3dc402c
@@ -1,16 +1,16 @@
|
||||
import random
|
||||
|
||||
|
||||
def print_n_whitespaces(n: int):
|
||||
def print_n_whitespaces(n: int) -> None:
|
||||
print(" " * n, end="")
|
||||
|
||||
|
||||
def print_n_newlines(n: int):
|
||||
def print_n_newlines(n: int) -> None:
|
||||
for _ in range(n):
|
||||
print()
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
print_n_whitespaces(32)
|
||||
print("BULLSEYE")
|
||||
print_n_whitespaces(15)
|
||||
|
||||
Reference in New Issue
Block a user