Posts

Showing posts from February, 2022

PYTHON MINI PROJECT

LIST OF PROJECTS IN PYTHON      Dice Roll Simulator.      Guess the number Game.      Random Password Generator      Binary Search      Basic Calculator      Data Visualization on different graphs

G3151-Problem Solving and Python Programming (2021 Regulations Anna University,Chennai)

  Problem Solving and Python Programming (2021 Regulations Anna University,Chennai) LIST OF EXPERIMENTS:  1. Identification and solving of simple real life or scientific or technical problems, and developing flow charts for the same. (Electricity Billing, Retail shop billing, Sin series, weight of a motorbike, Weight of a steel bar, compute Electrical Current in Three Phase AC Circuit, etc.) 2. Python programming using simple statements and expressions (exchange the values of two variables, circulate the values of n variables, distance between two points). 3. Scientific problems using Conditionals and Iterative loops. (Number series, Number Patterns, pyramid pattern) 4. Implementing real-time/technical applications using Lists, Tuples. (Items present in library/ Components of a car/ Materials required for construction of a building –operations of list & tuples) 5. Implementing real-time/technical applications using Sets, Dictionaries. (Language, components o...

12. Developing a game activity using Pygame like bouncing ball, car race etc.

Image
  12. Developing a game activity using Pygame like bouncing ball, car race etc.   SIMULATE BOUNCING BALL USING PYGAME   To write a python program to simulate bouncing ball using pygame.   PROGRAM/SOURCE CODE :   import sys, pygame   pygame.init()   size = width, height = 800, 600   speed = [1, 1]   background = 255, 255, 255   screen = pygame.display.set_mode(size)   pygame.display.set_caption("Bouncing ball")   ball = pygame.image.load("ball.png")   ballrect = ball.get_rect()   while 1:       for event in pygame.event.get():           if event.type == pygame.QUIT:               sys.exit()       ballrect = ballrect.move(speed)       if ballrect.left < 0 or ballrect.right > width: ...