Python - drawing a window with text center

Hi everyone thank for accepted in this group , i have small problem with my python code that i can’t go on i mean i am stucked , Hope everyone helpe me .

Acutally , the purpose of this exercise we have to (drawing a window with text center) .