The while True: loop is not needed because view.present() will keep your window active and responding to button clicks, etc. until the user clicks the X in the upper right, does a multi-finger swipe down, etc.
@NewbieCoder, your code seems to work, so what is the challenge you have?
Some key points about frame are that:
it refers to coordinates within the parent view
bounds can be used to access parent’s internal dimensions
root views only become full screen after being presented
flex can be used to make the frame change as the parent view’s size changes
I have no intention to bully you. Only trying to help. Python has a builtin set of capabilities (help(), pydoc, inspect, typing) that will help generate epydoc-like documentation of your code as well as do mypy type checking to find errors. The code that you write will be more future proof and readable by others if it follows the standard.