# Day Four 2014

**In class** We started off the class talking about math. I introduced the math functions already built into python, which we used to write some code dealing with variables and print statements. After that, we talked about raw input and string formatting.

What I wrote on the chalkboard during my lecture

Using both math and the raw input function, we created a math caluclator. I also told the students what imports do, and why they are helpful. To create that calculator, we made a nano file, which introduced the students to text editors. We also learnt how to save the file, and run it.

`nano my_calc.py python my_calc.py`

This caclculator takes two numbers as user input, and then applies the following operators, which produces a printed result.

- Addition
- Subtraction
- Multiplication
- Division (We used an import so that the calculator would produce decimal values since python automatically rounds)
- Exponentiation
- Remainders

The code on one of the student's computers

**Out of class** After class, I got to go visit a brewery. They had a variety of products, including juice, but they mostly produced spirits in their Kasauli factory.

My notebook

One of the student's notebooks