Civil War (Python): Fix variable names

This commit is contained in:
Martin Thoma
2022-04-02 11:32:37 +02:00
parent e17388d072
commit f1bc9d8551
2 changed files with 320 additions and 206 deletions

View File

@@ -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: