science of money and business
Compute trigonometric functions in Python (sin, cos, tan, arcsin, arccos, arctan)
Using math, Python's standard module for mathematical functions, you can compute trigonometric functions (sin, cos, ...
Compute exponential and logarithmic functions in Python (exp, log, log10, log2)
Using math, Python's standard module for mathematical functions, you can calculate exponential and logarithmic funct...
Compute and generate factorials, permutations and combinations in Python
The standard module math for mathematical functions in Python can be used to compute factorials. SciPy also has function...
How to write conditional branches with if statements in Python
Explain conditional branching with if statements in Python.Basics of if statements (if, elif, else)Specify conditions wi...
Writing if statements in one line with Python’s ternary operator (conditional operator)
Python has a writing style called ternary operators (conditional operators) that can describe a process like an if state...
Swap rows and columns of a two-dimensional array of Python list type
The standard Python list type can represent a two-dimensional array by a list of lists.This section explains how to swap...
Remove and extract duplicate elements from a list (array) in Python
This section describes how to generate a new list in Python by removing or extracting duplicate elements from a list (ar...
Determining if a list (array) has duplicate elements in Python
The following is a description of how to determine if a list (array) has duplicate elements (all elements are unique/uni...
Set operations (e.g., determining union sets, product sets, and subsets) with Python’s set type
Python provides a built-in data type, set, which handles sets.The type set is a collection of non-duplicate elements (el...
type(), isinstance() to get and determine type in Python
In Python, the built-in functions type() and isinstance() are used to get and check the type of an object, such as a var...