mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Python: Add type annotations
This commit is contained in:
committed by
Alexander Wunschik
parent
b95a514e84
commit
83b3dc402c
@@ -14,11 +14,11 @@ appeared one day one a computer at DEC.
|
||||
from random import randint
|
||||
|
||||
|
||||
def throw_dice():
|
||||
def throw_dice() -> int:
|
||||
return randint(1, 6) + randint(1, 6)
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
print(" " * 33 + "Craps")
|
||||
print(" " * 15 + "Creative Computing Morristown, New Jersey")
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user