Skip to content

Session 1 Introduction to Programming

Maximiliano Militzer edited this page Apr 7, 2025 · 1 revision

Session 1: Introduction to Programming (with Python)

Overview

Welcome to your first session! In this session, we'll introduce you to the fundamentals of programming using Python. Python is an excellent language for beginners due to its readable syntax and wide range of applications.

Learning Objectives

  • Understand what programming is and why it matters
  • Learn basic Python syntax and concepts
  • Write your first Python program
  • Understand variables, data types, and control flow

Topics Covered

1. What is Programming?

Programming is the process of creating a set of instructions that tell a computer how to perform a task. It's like giving step-by-step directions to someone, but the "someone" is a computer that follows your instructions exactly.

2. Why Python?

  • Easy to read and write
  • Great for beginners
  • Widely used in various fields (web development, data science, AI, etc.)
  • Large community and extensive libraries

3. Python Basics

  • Setting up Python on your computer
  • Using the Python interpreter
  • Writing your first "Hello, World!" program
print("Hello, World!")

4. Variables and Data Types

  • Numbers (integers, floats)
  • Strings
  • Booleans
  • Lists
  • Dictionaries
# Variables example
name = "John"
age = 25
is_student = True
hobbies = ["reading", "gaming", "coding"]
person = {"name": "John", "age": 25, "is_student": True}

5. Control Flow

  • If statements
  • Loops (for and while)
  • Functions
# If statement example
if age >= 18:
    print("You are an adult")
else:
    print("You are a minor")

# For loop example
for hobby in hobbies:
    print(f"I enjoy {hobby}")

# Function example
def greet(name):
    return f"Hello, {name}!"

Practice Exercises

  1. Write a program that asks for the user's name and greets them.
  2. Create a calculator that can add, subtract, multiply, and divide.
  3. Write a program that converts temperature from Celsius to Fahrenheit.

Additional Resources

Next Steps

Now that you have a basic understanding of Python, you're ready to move on to Session 2: Git and GitHub.

Clone this wiki locally