fixed #6, fixed #7

This commit is contained in:
2020-01-12 10:35:58 +01:00
parent 58b57c6be2
commit 3e999e679e
2 changed files with 8 additions and 3 deletions

View File

@@ -1,2 +1,3 @@
# 16 quadrillion
MAX_NUM = 16_000_000_000_000_000
DEFAULT_COUNTING_SPEED = 57_000 // 2

View File

@@ -1,7 +1,7 @@
# (c) 2020 Simon Averbach and Zev Averbach
from time import sleep
from config import MAX_NUM
from config import MAX_NUM, DEFAULT_COUNTING_SPEED
def math_game():
@@ -17,8 +17,12 @@ def math_game():
print("How much do you want to add each time?")
each = int(input("> "))
print("How many counts do you want to do per second?")
num_counts_per_second = int(input("> "))
print(f"How many counts do you want to do per second? [{DEFAULT_COUNTING_SPEED:,}]")
num_counts_per_second_string = input("> ")
if num_counts_per_second_string == '':
num_counts_per_second = DEFAULT_COUNTING_SPEED
else:
num_counts_per_second = int(num_counts_per_second_string)
print(f"Okay, here we go! We're going to count from zero to {number}, "
f"adding {each} {num_counts_per_second} times per second.")