Computer Science Notes - Introduction to Programming
• Programming: giving instructions to a computer to perform tasks.
• Basic Concepts:
- Variables: store data values.
- Data types: integers, floats, strings, booleans.
- Operators: +, -, *, / for arithmetic; ==, != for comparison.
• Control Structures:
- If statements: make decisions.
- Loops: repeat actions (for, while).
• Functions: reusable blocks of code.
• Example (Python):
def greet(name):
print('Hello, ' + name)
• Importance of Programming:
- Automates tasks.
- Creates apps, games, websites, AI.
• Careers: software developer, data scientist, cybersecurity analyst.