Session 1: Python Fundamentals
Python is a programming language - a way to tell computers exactly what to do, step by step.
Fun fact: Python is named after Monty Python, not the snake!
The simplest Python program uses print() - this tells Python to display text on the screen.
Output: Hello, World!
Notice: Text inside quotes is called a string - it's just text data.
A variable is a container that holds information. You can store numbers, text, and more.
Output:
Alice
13
The input() function lets you ask users to type information.
Interaction:
Computer asks: What's your name?
You type: Bob
Computer says: Hello,
Bob!
Python can do math! Use +, -, *, / for add, subtract, multiply, divide.
Let's create a program that calculates how old you'll be in 10 years!
New concepts: int() converts text to numbers, str() converts numbers to text
This introduces if/else! More on that next session.
Write a program that:
You've written your first Python programs
Next Session: Make Programs Smarter with If/Else Logic