setup() function can be used.code snippet
turtle.setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"])
Set the size and position of the main window. Default values of arguments are stored in the configuration dictionary and can be changed via a turtle.cfg file.
Parameters
width – if an integer, a size in pixels, if a float, a fraction of the screen; default is 50% of screen
height – if an integer, the height in pixels, if a float, a fraction of the screen; default is 75% of screen
startx – if positive, starting position in pixels from the left edge of the screen, if negative from the right edge, if None, center window horizontally
starty – if positive, starting position in pixels from the top edge of the screen, if negative from the bottom edge, if None, center window vertically
screen.setup (width=200, height=200, startx=0, starty=0)
# sets window to 200x200 pixels, in upper left of screen
screen.setup(width=.75, height=0.5, startx=None, starty=None)
# sets window to 75% of screen by 50% of screen and centers