Is it possible to create an in game compiler for a programming language such as c++ or python? I mean import the language and use it in a way that the player can interact with objects

That is brilliant information! Thank you. Looks like python might be the ticket!