Game Development Reference
In-Depth Information
Glossary
shell
- see, interactive shell
simple substitution ciphers
- A cipher where each letter is replaced by one and only
one other letter.
slice
- A subset of values in a list. These are accessed using the : colon character in
between the square brackets. For example, if
spam
has the value
['a', 'b', 'c',
'd', 'e', 'f']
, then the slice
spam[2:4]
has the value
['c', 'd']
. Similar to a
substring.
software
- see, program
source code
- The text that you type in to write a program.
statement
- A command or line of Python code that does not evaluate to a value.
stepping
- Executing one line of code at a time in a debugger, which can make it easier
to find out when problems in the code occur.
string concatenation
- Combining two strings together with the + operator to form a
new string. For example,
'Hello ' + 'World!'
evaluates to the string
'Hello
World!'
string formatting
- Another term for string interpolation.
string interpolation
- Using conversion specifiers in a string as place holders for other
values. Using string interpolation is a more convenient alternative to string concatenation.
For example,
'Hello, %s. Are you going to %s on %s?' % (name,
activity, day)
evaluates to the string
'Hello, Albert. Are you going
to program on Thursday?'
, if the variables have those corresponding values.
string
- A value made up of text. Strings are typed in with a single quote ' or double " on
either side. For example,
'Hello'
substring
- A subset of a string value. For example, if
spam
is the string
'Hello'
,
then the substring
spam[1:4]
is
'ell'
. Similar to a list slice.
symbols
- In cryptography, the individual characters that are encrypted.
syntax
- The rules for how code is ordered in a programming language, much like
grammar is made up of the rules for understandable English sentences.
syntax error
- An error that occurs when the Python interpreter does not understand the
code because the code is incomplete or in the wrong order. A program with a syntax error
will not run.