In this chapter, we will learn some basic concepts and several frequently used built-in functions of Python, such as basic assignment, precision, addition, subtraction, division, power function, and square root function. In short, we demonstrate how to use Python as an ordinary calculator to solve many finance-related problems.
In this chapter, we will cover the following topics:
Assigning values to variables
Displaying the value of a variable
Exploring error messages
Understanding why we can't call a variable without assignment
Choosing meaningful variable names
Using
dir()
to find variables and functionsDeleting or unsigning a variable
Learning basic math operations—addition, subtraction, multiplication, and division
Learning about the power function, floor, and remainder
Choosing appropriate precision
Finding out more information about a specific built-in function
Importing the
math
moduleThe pi, e, log, and exponential functions
Distinguishing between...