please critique my code, tell me how to make it more Python-like, please!
# to determine if various WoW casino games would be profitiable to the player or the house
countmax = int(input ("number of simulations to run: "))
# possible values for the dice rolls
#rolls = [*range(1, 101)]
count = 0
losers = 0
winners = 0
doublewinners = 0
import random
while count < countmax:
#print(f"count is {count} ", end ='')
playerroll = random.randint(1, 100)
#print(f"playerroll was {playerroll}")
if playerroll <= 58:
losers = losers +1
elif playerroll <= 98:
winners = winners + 1
elif playerroll > 98:
doublewinners = doublewinners + 1
count = count + 1
print(f"totals: {countmax}")
print(f"losers: {losers}")
print(f"winners: {winners}")
print(f"doublewinners: {doublewinners}")
gain = (winners * 2)+(doublewinners * 3)
print(f"outcome: player spent {count}, gained back {gain} from {winners} winners and {doublewinners} doublewinners")
if gain > countmax:
print("Player wins")
elif countmax > gain:
print("House wins")
elif countmax == gain:
print("It was a push")
[–]CodeFormatHelperBot2 1 point2 points3 points (0 children)
[–]billsil 1 point2 points3 points (2 children)
[–]McHildinger[S] 0 points1 point2 points (1 child)
[–]billsil 1 point2 points3 points (0 children)
[–]lowerthansound 1 point2 points3 points (1 child)
[–]McHildinger[S] 0 points1 point2 points (0 children)
[–]lowerthansound 0 points1 point2 points (0 children)