How joker383627/python_basics_class works
This repository contains two independent Python programs: a command-line arithmetic calculator and a Pygame space-shooter. The calculator converts entered infix expressions to postfix form and evaluates them; the game handles controls, enemies, bullets, collisions, scoring, and display in its main loop. The game source and two audio assets are sampled; the notebooks and referenced image/font assets are not, so they are omitted.
Main entry points: space_petrol.py Game Loop · shunting.py Calculator Loop · background.wav Background Audio · explosion.wav Explosion Audio
Components 15
Calculator
- Calculator Loop
shunting.py - Infix Conversion
shunting.py - Postfix Evaluation
shunting.py
Space Game
- Game Loop
a boring game/space_petrol.py - Player Events
a boring game/space_petrol.py - Player Movement
a boring game/space_petrol.py - Enemy System
a boring game/space_petrol.py - Bullet System
a boring game/space_petrol.py - Collision and Scoring
a boring game/space_petrol.py - Game Display
a boring game/space_petrol.py
Audio Assets
- Pygame Audio
- Background Audio
a boring game/background.wav - Explosion Audio
a boring game/explosion.wav
Other components
- Calculator User
- Player
Connections 16
- Calculator User → Calculator Loop: enters expressions
- Calculator Loop → Infix Conversion: converts input
- Calculator Loop → Postfix Evaluation: evaluates result
- Calculator Loop → Calculator User: prints result
- Player → Player Events: presses controls
- Game Loop → Player Events: dispatches events
- Game Loop → Player Movement: updates position
- Game Loop → Enemy System: moves enemies
- Game Loop → Bullet System: updates bullets
- Game Loop → Collision and Scoring: checks collisions
- Game Loop → Game Display: renders frame
- Player Events → Player Movement: sets controls
- Game Loop → Pygame Audio: starts music
- Game Loop → Pygame Audio: plays effects
- Pygame Audio → Background Audio: loads music
- Pygame Audio → Explosion Audio: loads effect