mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-12 15:50:20 -08:00
Simplify Python Code
print_with_tab / print_with_whitespace is trivial with Python string formatting and was mostly used in only 2 lines.
This commit is contained in:
@@ -88,17 +88,13 @@ def compute_change() -> None:
|
||||
print(f"{change_in_pennies} PENNY(S)")
|
||||
|
||||
|
||||
def print_thanks() -> None:
|
||||
print("THANK YOU, COME AGAIN.\n\n")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
print_header("CHANGE")
|
||||
print_introduction()
|
||||
|
||||
while True:
|
||||
compute_change()
|
||||
print_thanks()
|
||||
print("THANK YOU, COME AGAIN.\n\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user