Opening the book…
def terminate():
pygame.quit()
sys.exit()
The terminate() function works the same as in the previous game programs.
This page titled 9.28: The Same Old terminate() Function was last modified on Sat, 09 Nov 2019 23:29:54 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Al Sweigart via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.