You should be able to define the following terms:
- syntax
- semantics
- algorithm
- program
- computer
- variable
- data types: int, float, string (or str), sequence (or list)
You should be able to use the following Python concepts:
- assignment using =
- basic arithmetic expressions using +, -, *, /, **, %
- type()
- range()
- input()
- for loops
- print
- def main():
Practice problems
- Programming exercise 1 on page 22 of Zelle
- True/False questions starting on page 46 of Zelle
- Problem 4 on page 48 of Zelle
- Problem 8 on page 49 of Zelle
- Write a for loop that prints your name 10 times.
- Write a for loop that prints the numbers from 1 to 5.
- What is the value and type for each of the following expressions? Try them in python to check your answers.
- 2 + 5
- 2.0 + 5
- 5/2
- 5/2.0
- 5 % 10
- range(1,5)
- range(10,1,-1)
- range(3)
- 5 - 2 * 3