mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-14 14:07:38 -08:00
Clean Code: Python
Fix issues found by flake8-bugbear: * Unused loop variables * assert statements in non-test code * mixing test code with production code * mark one excessive test which takes ~10min to run as 'slow'
This commit is contained in:
@@ -51,7 +51,7 @@ while still_playing:
|
||||
n = int(input("How many rolls? "))
|
||||
|
||||
# Roll the dice n times
|
||||
for i in range(n):
|
||||
for _ in range(n):
|
||||
die1 = random.randint(1, 6)
|
||||
die2 = random.randint(1, 6)
|
||||
roll_total = die1 + die2
|
||||
|
||||
Reference in New Issue
Block a user