mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Civil War (Python): Fix variable names
This commit is contained in:
@@ -29,19 +29,21 @@ def game() -> None:
|
||||
print("\nTake a Number and ADD 3. Now, Divide this number by 5 and")
|
||||
print("multiply by 8. Now, Divide by 5 and add the same. Subtract 1")
|
||||
|
||||
resp = float(input("\nWhat do you have? "))
|
||||
comp_guess = (((resp - 4) * 5) / 8) * 5 - 3
|
||||
resp2 = input(f"\nI bet your number was {comp_guess} was I right(Yes or No)? ")
|
||||
you_have = float(input("\nWhat do you have? "))
|
||||
comp_guess = (((you_have - 4) * 5) / 8) * 5 - 3
|
||||
first_guess_right = input(
|
||||
f"\nI bet your number was {comp_guess} was I right(Yes or No)? "
|
||||
)
|
||||
|
||||
if resp2.lower() == "yes":
|
||||
if first_guess_right.lower() == "yes":
|
||||
print("\nHuh, I Knew I was unbeatable")
|
||||
print("And here is how i did it")
|
||||
print_solution(comp_guess)
|
||||
input()
|
||||
else:
|
||||
resp3 = float(input("\nHUH!! what was you original number? "))
|
||||
original_number = float(input("\nHUH!! what was you original number? "))
|
||||
|
||||
if resp3 == comp_guess:
|
||||
if original_number == comp_guess:
|
||||
print("\nThat was my guess, AHA i was right")
|
||||
print(
|
||||
"Shamed to accept defeat i guess, don't worry you can master mathematics too"
|
||||
@@ -52,11 +54,11 @@ def game() -> None:
|
||||
else:
|
||||
print("\nSo you think you're so smart, EH?")
|
||||
print("Now, Watch")
|
||||
print_solution(resp3)
|
||||
print_solution(original_number)
|
||||
|
||||
resp4 = input("\nNow do you believe me? ")
|
||||
believe_me = input("\nNow do you believe me? ")
|
||||
|
||||
if resp4.lower() == "yes":
|
||||
if believe_me.lower() == "yes":
|
||||
print("\nOk, Lets play again sometime bye!!!!")
|
||||
input()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user