Game Development Reference
In-Depth Information
Topics Covered In This Chapter:
— Flow of execution
— Strings
— String concatenation
— Data types (such as strings or integers)
— Using IDLE to write source code.
— Saving and running programs in IDLE.
— The print() function.
— The input() function.
— Comments
— Capitalizing variables
— Case-sensitivity
— Overwriting variables
That's enough of integers and math for now. Python is more than just a calculator. Now
let's see what Python can do with text. In this chapter, we will learn how to store text in
variables, combine text together, and display them on the screen. Many of our programs
will use text to display our games to the player, and the player will enter text into our
programs through the keyboard. We will also make our first program, which greets the user
with the text, "Hello World!" and asks for the user's name.
Strings
In Python, we work with little chunks of text called strings . We can store string values
inside variables just like we can store number values inside variables. When we type
Search WWH ::




Custom Search