Note 01: Introduction¶
Programming is the work of describing a process precisely enough that a computer can carry it out. In CPSC 110, we focus on small Python programs that read input, compute a result, and present output clearly.
Core Ideas¶
- A program is a sequence of instructions.
- An algorithm is a step-by-step solution strategy.
- A bug is a mismatch between intended and actual behavior.
- A test case is a chosen input used to check a program.
First Example¶
name = input("What is your name? ")
print("Welcome,", name)
This program:
- Prompts the user.
- Stores the response.
- Prints a message using that response.
Good Habits Early¶
- Run code often.
- Read error messages carefully.
- Change one thing at a time while debugging.
- Use meaningful variable names from the start.