now create bullet py file to store our bullet class here' the first part of bullet pybullet py import pygame from pygame sprite import sprite class bullet(sprite)""" class to manage bullets fired from the ship""def __init__(selfai_settingsscreenship)"""create bullet object at the ship' current position ""super(bulletself__init__(self screen screen create bullet rect at ( and then set correct position self rect pygame rect( ai_settings bullet_widthai_settings bullet_heightself rect centerx ship rect centerx self rect top ship rect top store the bullet' position as decimal value self float(self rect yu self color ai_settings bullet_color self speed_factor ai_settings bullet_speed_factor the bullet class inherits from spritewhich we import from the pygame sprite module when you use spritesyou can group related elements in your game and act on all the grouped elements at once to create bullet instance__init__(needs the ai_settingsscreenand ship instancesand we call super(to inherit properly from sprite note the call super(bulletself__init__(uses python syntax this works in python tooor you can also write this call more simply as super(__init__(at uwe create the bullet' rect attribute the bullet is not based on an image so we have to build rect from scratch using the pygame rect(class this class requires the xand -coordinates of the top-left corner of the rectand the width and height of the rect we initialize the rect at ( )but we'll move it to the correct location in the next two linesbecause the bullet' position is dependent on the ship' position we get the width and height of the bullet from the values stored in ai_settings at vwe set the bullet' centerx to be the same as the ship' rect centerx the bullet should emerge from the top of the shipso we set the top of the bullet' rect to match the top of the ship' rectmaking it look like the bullet is fired from the ship we store decimal value for the bullet' -coordinate so we can make fine adjustments to the bullet' speed at ywe store the bullet' color and speed settings in self color and self speed_factor