Chapter 3 - Selection Flashcards
1
Q
What are three basic ways of controlling the order in which the program are carried out?
A
- sequence
- selection
- iteration
2
Q
What does a selection statement start with ?
A
if
3
Q
What is a method?
A
is written using dot notation with the name of the object followed by a full stop then the name.
4
Q
What is a function?
A
is a written function with the function name followed by the name of the object in parentheses.
- for example: numchars = len(astring)
5
Q
What is elif?
A
else if
6
Q
A