python - Pygame score issue -


while not done:     baddieaddcounter = 0     baddies = []     score += 1     fact = ""      #gives player new fact everytime reach target score     if score < 200:        fact == 'nothing'      elif score > 200 , score <= 599:        fact == 'swag'      elif score > 600 , score <= 799:        fact == 'brehh'       drawtext('score: %s' % (score), font, screen, 10, 0)     drawtext('fact: %s' % (fact), font, screen, 10, 40)     pygame.display.update() 

why not working? in game, once players score reaches target score (ex >200) it's supposed change fact (ex. swag') says in 'if' statement stays same because of 'fact = ""'.

you not assigning fact, comparing it. assume want is

if score < 200:        fact = 'nothing'  elif score > 200 , score <= 599:    fact = 'swag'  elif score > 600 , score <= 799:    fact = 'brehh' 

also note, @ score of 200 player blank fact, first condition less 200, , next greater 200.


Comments