Game Development Reference
In-Depth Information
Topics Covered In This Chapter:
— Using print() 's end keyword argument to skip newlines.
— Escape characters.
— Using single quotes and double quotes for strings.
Make the Most of print()
Most of the games in this topic will have simple text for input and output. The input is
typed by the user on the keyboard and entered to the computer. The output is the text
displayed on the screen. In Python, the print() function can be used for displaying
textual output on the screen. We've learned how the basics of using the print() function,
but there is more to learn about how strings and print() work in Python.
Sample Run of Jokes
What do you get when you cross a snowman with a vampire?
Frostbite!
What do dentists call an astronaut's cavity?
A black hole!
Knock knock.
Search WWH ::




Custom Search