Is the code editor st_ace able to show the actual output of the code?

So I want to build a programming quiz app where you look at code and the user has to decide what the output is.

So far, I can simply use streamlit_ace to display the code block and 4-5 simple checkboxes for the answers.


Now my question, I know that there are security reasons why users should not run code in an app but am I able to display the actual output?