Skip to content

Commit 5b89735

Browse files
committed
Remove missed error; remove underscored-unused variables
1 parent 786eb18 commit 5b89735

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

03_Animal/python/animal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def main() -> None:
131131
# Main loop of game
132132
print_intro()
133133
while (
134-
_keep_playing := parse_input(
134+
parse_input(
135135
"Are you thinking of an animal? ", True, root
136136
)
137137
== "y"

17_Bullfight/python/bullfight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def determine_player_kills(
2929
print(f"THE {player_type}{plural_form} DID A {job_qualities[job_quality]} JOB.")
3030
if job_quality >= 4:
3131
if job_quality == 5:
32-
if _player_was_killed := random.choice([True, False]):
32+
if random.choice([True, False]):
3333
print(f"ONE OF THE {player_type}{plural_form} WAS KILLED.")
3434
else:
3535
if player_type != "TOREAD":

49_Hockey/python/hockey.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def print_header() -> None:
127127

128128

129129
def instructions() -> None:
130-
if _wants_it := ask_binary(
130+
if ask_binary(
131131
"WOULD YOU LIKE THE INSTRUCTIONS? ", "ANSWER YES OR NO!!"
132132
):
133133
print()
@@ -408,7 +408,7 @@ def handle_miss(
408408
return ("continue", remaining_time)
409409
if saving_player == 2:
410410
print(f"WHAT A SPECTACULAR GLOVE SAVE BY {team_b.players[5]}\n")
411-
print(f"AND {team_b.players[5]}" + " GOLFS IT INTO THE CROWD\n")
411+
print(f"AND {team_b.players[5]} GOLFS IT INTO THE CROWD\n")
412412
return ("break", remaining_time)
413413
if saving_player == 3:
414414
print(f"SKATE SAVE ON A LOW STEAMER BY {team_b.players[5]}\n")

59_Lunar_LEM_Rocket/python/lunar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def run_simulation() -> None:
324324
return
325325

326326
if capsule.velocity > 0 and new_state.velocity < 0:
327-
if _landed := handle_flyaway(sim_clock, capsule):
327+
if handle_flyaway(sim_clock, capsule):
328328
process_final_tick(delta_t, sim_clock, capsule)
329329
return
330330

64_Nicomachus/python/nicomachus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def play_game() -> None:
4343

4444
print(f"YOUR NUMBER WAS {d}, RIGHT?")
4545

46-
if _response := get_yes_or_no():
46+
if get_yes_or_no():
4747
print("HOW ABOUT THAT!!")
4848
else:
4949
print("I FEEL YOUR ARITHMETIC IS IN ERROR.")

65_Nim/python/Traditional_NIM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def main() -> None:
9696
f"\nA.I MOVE - A.I Removed {ai_command[1]} pegs from Pile {ai_command[0]}"
9797
)
9898
game.remove_pegs(f"{str(ai_command[0])},{str(ai_command[1])}")
99-
if _end := game.check_for_win():
99+
if game.check_for_win():
100100
print("\nComputer Wins the Game, Better Luck Next Time\n")
101101
input("Press any key to exit")
102102
break

69_Pizza/python/pizza.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def main() -> None:
155155

156156
player_name = print_instructions()
157157

158-
if _more_directions := yes_no_prompt("DO YOU NEED MORE DIRECTIONS?"):
158+
if yes_no_prompt("DO YOU NEED MORE DIRECTIONS?"):
159159
print_more_directions(player_name)
160160

161161
understand = yes_no_prompt("UNDERSTAND?")

0 commit comments

Comments
 (0)