Extent: | Online-Ressource (1 online resource (408 p.)) |
---|---|
Series: | |
Type of publication: | Book / Working Paper |
Language: | English |
Notes: | Description based upon print version of record Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introduction and Installation of Python; Introduction to Python; Installing Python; Different versions of Python; Ways to launch Python; Launching Python with GUI; Launching Python from the Python command line; Launching Python from our own DOS window; Quitting Python; Error messages; Python language is case sensitive; Initializing the variable; Finding the help window; Finding manuals and tutorials; Finding the version of Python; Summary; Exercises Chapter 2: Using Python as an Ordinary CalculatorAssigning values to variables; Displaying the value of a variable; Error messages; Can't call a variable without assignment; Choosing meaningful names; Using dir() to find variables and functions; Deleting or unsigning a variable; Basic math operations - addition, subtraction, multiplication, and division; The power function, floor, and remainder; A true power function; Choosing appropriate precision; Finding out more information about a specific built-in function; Listing all built-in functions; Importing the math module The pi, e, log, and exponential functions""import math"" versus ""from math import *""; A few frequently used functions; The print() function; The type() function; Last expression _ (underscore); Combining two strings; The upper() function; The tuple data type; Summary; Exercises; Chapter 3: Using Python as a Financial Calculator; Writing a Python function without saving it; Default input values for a function; Indentation is critical in Python; Checking the existence of our functions; Defining functions from our Python editor; Activating our function using the import function Debugging a program from a Python editorTwo ways to call our pv_f() function; Generating our own module; Types of comments; The first type of comment; The second type of comment; Finding information about our pv_f() function; The if() function; Annuity estimation; Converting the interest rates; Continuously compounded interest rate; A data type - list; Net present value and the NPV rule; Defining the payback period and the payback period rule; Defining IRR and the IRR rule; Showing certain files in a specific subdirectory; Using Python as a financial calculator Adding our project directory to the pathSummary; Exercises; Chapter 4: 13 Lines of Python to Price a Call Option; Writing a program - the empty shell method; Writing a program - the comment-all-out method; Using and debugging other programs; Summary; Exercises; Chapter 5: Introduction to Modules; What is a module?; Importing a module; Adopting a short name for an imported module; Showing all functions in an imported module; Comparing ""import math"" and ""from math import *""; Deleting an imported module; Importing only a few needed functions; Finding out all built-in modules Finding out all the available modules |
ISBN: | 978-1-78328-438-2 ; 978-1-78328-437-5 ; 978-1-78328-437-5 |
Source: | ECONIS - Online Catalogue of the ZBW |
Persistent link: https://ebvufind01.dmz1.zbw.eu/10012684362