---
title: Deckset-style Lecture Fixture
---

<x-player-app />

# CS-121

## Introduction to Programming

### A Deckset-style Play fixture

---

# What is programming?

Programming is the process of writing instructions for computers to follow.

---

# What can you do with code?

- Solve problems for people
- Express an idea precisely
- Automate repetitive work
- Build tools that change what is possible

---

# Variables

## `name = value`

```python
name = "Ada"
age = 36
language = "Python"
```

---

# Functions

```python
def greet(name):
    return f"Hello, {name}!"
```

- Give a useful operation a name
- Accept inputs
- Return an output

---

# Quick practice

Write an `is_even(number)` function that returns `True` for even numbers.

<p id="lecture-action" data-pmx-beat="lecture-action">
  When you are ready, <a href="#solution">show the solution</a>.
</p>

---

# Solution

```python
def is_even(number):
    return number % 2 == 0
```

---

# Go time

- Focus on code
- Ask for help
- Test and iterate
