As of now, the “if/else” statement is used to identify the ID of the powerups. However, as the number of…