O'Reilly logo

Invent Your Own Computer Games with Python , 4th Edition by Al Sweigart

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4A JOKE-TELLING PROGRAM

image

This chapter’s program tells a few jokes to the user and demonstrates more advanced ways to use strings with the print() function. Most of the games in this book will have simple text for input and output. The input is typed on the keyboard by the user, and the output is the text displayed on the screen.

You’ve already learned how to display simple text output with the print() function. Now let’s take a deeper look at how strings and print() work in Python.

Sample ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required