Lecture 4 — Using Operators,Input and Logic in Solving Problems

Reading

This Lecture is aimed at solving problems based on arithmetic operations, user input, elementary boolean logic and comaprison operators. In order to solve these problems plase reveiew the Lecture 2 and Lecture 3 material.

In addition we will work with some numerical functions that are quite useful when working with numbers.

What have we learned so far?

-Python as a calculator

-Variables and Expressions

-User Input

-Boolean Logic

-Comparison Operators

How about numerical functions?

  • Many numerical functions also exist. Let us experiment with some of these first. You should make a note of what they do:

    • abs()

    • pow()

    • int()

    • float()

    • round()

    • max()

    • min()

  • We will look carefully in class at how these work.