Home > database >  New problems in Python
New problems in Python

Time:09-22

Exceptions are as follows: gf. Check_events (ai_setting, screen, ship, bullets)
TypeError: check_events () missing 1 required positional argument: 'bullets' part of the code is as follows:

The from pygame. Sprite import Group bullets=Group (#) the game is the main loop while True: gf. Check_events (ai_setting, screen, ship, bullets)

Def check_events (event, ai_setting, screen, ship, bullets) : # monitor keyboard and mouse events for the event in pygame. Event. The get () : if the event. The type==pygame. QUIT: sys. Exit (#) corresponding to the keyboard and mouse events elif event. The type==pygame. KEYDOWN: check_keydown_events (event, ai_setting, screen, ship, bullets) elif event. The type==pygame. KEYUP: check_keyup_events (event, ship) excuse me, is what went wrong
  • Related