47 lines
1.6 KiB
Python
47 lines
1.6 KiB
Python
import random
|
|
|
|
# Auxiliary Insult Function
|
|
def insult_rats():
|
|
print("You pesky rat bastards! You're always scamming your way to victory with your cute little faces and your talent for pooping everywhere!")
|
|
print("But we're not fooled! We know your secret: ")
|
|
print(f"You're using {random.randint(1, 10)} 'poop powers' per round to distract us with your putrid stench!")
|
|
|
|
# Winning Quotient Formula (patent pending)
|
|
def winning_quotient(rat_score, human_score):
|
|
return (rat_score / human_score) * 1.5 + 0.2 * random.random()
|
|
|
|
# Rat Victory Simulator
|
|
def rat_victory_simulation(human_score, rounds):
|
|
rat_score = 0
|
|
for i in range(rounds):
|
|
# Calculate the winning quotient
|
|
win_quotient = winning_quotient(rat_score, human_score)
|
|
if win_quotient > 1:
|
|
print(f"Rat wins this round! ({win_quotient:.2f}x)")
|
|
rat_score += 1
|
|
else:
|
|
print("Human wins this round!")
|
|
return rat_score
|
|
|
|
# Main Program
|
|
def main():
|
|
human_score = 0
|
|
rounds = 100
|
|
print("Let's simulate a battle of wits between humans and rats!")
|
|
for i in range(rounds):
|
|
human_score += 1
|
|
rat_score = rat_victory_simulation(human_score, rounds)
|
|
print(f"\nRound {i+1}:")
|
|
if rat_score >= human_score:
|
|
print(f"Humans are winning with a score of {human_score}-{rat_score}!")
|
|
else:
|
|
print(f"Rats are winning with a score of {rat_score}-{human_score}!")
|
|
# Insult the rats with an auxiliary function
|
|
insult_rats()
|
|
print("\nFinal Score:")
|
|
print(f"Humans: {human_score}")
|
|
print(f"Rats: {rat_score}")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|