Posts

Showing posts from January 25, 2019

Shivraj Patil

Image
For Former Karnataka Lokayukta and Justice of the Supreme Court of India, see Shivaraj Patil. Shivraj Vishwanath Patil Governor of Punjab and Administrator of Chandigarh In office 22 January 2010 – 21 January 2015 Preceded by Sunith Francis Rodrigues Succeeded by Kaptan Singh Solanki Minister for Home Affairs In office 22 May 2004 – 30 November 2008 [1] Prime Minister Manmohan Singh Preceded by Lal Krishna Advani Succeeded by P. Chidambaram 10th Speaker of Lok Sabha In office 10 July 1991 – 22 May 1996 Deputy S. Mallikarjunaiah Preceded by Rabi Ray Succeeded by P.A. Sangma Personal details Born ( 1935-10-12 ) 12 October 1935 (age 83) Latur, Hyderabad State, British India (now in Maharashtra, India) Political party Indian National Congress Occupation Politician Shivraj Vishwanath Patil (born 12 October 1935) is an Indian politician who was the Governor of the state of Punjab and Administrator of the Union Terri

how do you create jumping in pygame for a sprite

Image
0 I am struggling with finding a way to make the sprite jump in pygame . when i basically run the program now the sprite goes straight to the top of the screen and i just want it to do a normal jump. the jump is in a class and is a function. I have used KEYDOWN to check when its pressed to move it downwards. import pygame import random import sys pygame.init() screen = pygame.display.set_mode((1280, 720)) clock = pygame.time.Clock() # A clock to limit the frame rate. pygame.display.set_caption("this game") class Background: picture = pygame.image.load("C:/images/dunes.jpg").convert() picture = pygame.transform.scale(picture, (1280, 720)) def __init__(self, x, y): self.xpos = x self.ypos = y def draw(self): # Blit the picture onto th