[Solved] Generate random numer in python?


You’ve got two syntax errors, a spacing error, and you’re using a keyword which doesn’t exist.

if gameA>0.4   #<-- end this with a colon
profitA=profitA+1 #<-- needs more indent
end #<-- what is end?

All of that is repeated in gameB.

In addition:

  • profitA and profitB aren’t defined in testA and testB.
  • testA is the same code as testB, which means that over time they will return about the same value.

solved Generate random numer in python?