title: How do I make a sprite "jump", in a simple Mario-like game?
body: <p>What would be the best way to cause the spriteimg jump. I want to have the sprite glide up and then back down when K_UP is pressed. What would be the best approach to this?</p>
  
  <pre><code>while running:
      setup_background()
      spriteimg = plumberright
  
      screen.blit(spriteimg,(x1, y1))
      keys = pygame.key.get_pressed()
      for event in pygame.event.get():
           if event.type == pygame.QUIT:
               running = False
  
      if keys[pygame.K_UP]:
                y1 -= 2
      elif keys[pygame.K_RIGHT]:
                x1 += 2
      elif keys[pygame.K_LEFT]:
                 x1 -= 2
  
  
      pygame.display.flip()
      clock.tick(120)
  </code></pre>