Description
A Simple Introduction to Python is aimed at pre-university students and complete novices to programming. The whole book has been created using Jupyter notebooks. After introducing Python as a powerful calculator, simple programming constructs are covered, and the NumPy, MatPlotLib and SymPy modules (libraries) are introduced. Python is then used for Mathematics, Cryptography, Artificial Intelligence, Data Science and Object Oriented Programming.
The reader is shown how to program using the integrated development environments: Python IDLE, Spyder, Jupyter notebooks, and through cloud computing with Google Colab.
Features:
- No prior experience in programming is required.
- Demonstrates how to format Jupyter notebooks for publication on the Web.
- Full solutions to exercises are available as a Jupyter notebook on the Web.
- All Jupyter notebook solution files can be downloaded through GitHub.
GitHub Repository of Data Files and a Jupyter Solution notebook:
https://github.com/proflynch/A-Simple-Introduction-to-Python
Jupyter Solution notebook web page:
https://drstephenlynch.github.io/webpages/A-Simple-Introduction-to-Python-Solutions.html
Table of Contents
1. Python as a Powerful Calculator. 1.1. BODMAS. 1.2. Fractions: Symbolic Computation. 1.3. Powers (Exponentiation) and Roots. 1.4. The Math Library (Module) Chapter. 2. Simple Programming With Python. 2.1. Lists, Tuples, Sets and Dictionaries. 2.2. Defining Functions (Programming). 2.3. For and While Loops. 2.4. Conditional Statements, If, Elif, Else. 3. The Turtle Library. 3.1. The Cantor Set Fractal. 3.2. The Koch Snowflake. 3.3. A Bifurcating Tree. 3.4. The Sierpinski Triangle. 4. NumPy and MatPlotLib. 4.1. Numerical Python (Numpy). 4.2. MatPlotLib. 4.3. Scatter Plots. 4.4. Surface Plots. 5. Google Colab, SymPy and GitHub. 5.1. Google Colab. 5.2. Formatting Notebooks. 5.3. Symbolic Python (Sympy). 5.4. GitHub. 6. Python for Mathematics. 6.1. Basic Algebra. 6.2. Solving Equations. 6.3. Functions (Mathematics). 6.4. Differentiation and Integration (Calculus). 7. Introduction to Cryptography. 7.1. The Caesar Cipher. 7.2. The XOR Cipher. 7.3. The Rivest-Shamir-Adleman (RSA) Cryptosystem. 7.4. Simple RSA Algorithm Example. 8. An Introduction to Artificial Intelligence. 8.1. Artificial Neural Networks. 8.2. The And/Or and XOR Gate Anns. 8.3. The Backpropagation Algorithm. 8.4. Boston Housing Data. 9. An Introduction to Data Science. 9.1. Introduction to Pandas. 9.2. Load, Clean and Preprocess the Data. 9.3. Exploring the Data. 9.4. Violin, Scatter and Hexagonal Bin Plots. 10. An Introduction to Object Oriented Programming. 10.1. Classes and Objects. 10.2. Encapsulation. 10.3. Inheritance. 10.4. Polymorphism.