Sign up
Forgot password?
FAQ: Login

Lynch Stephen. A Simple Introduction to Python

  • pdf file
  • size 21,35 MB
Lynch Stephen. A Simple Introduction to Python
CRC Press, Chapman & Hall/CRC, 2024. — 113 p. – (The Python Series). – ISBN: 978-1-032-75029-3.
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.
Currently, Python is the most popular programming language in the world. It is open-source and completely free to the user. It is also fun to program with and extremely powerful at solving real-world problems. This book is for pre-university students or complete novices in programming.
In the second part of the Preface, the reader is shown three (from many) methods to access Python. The Python Integrated Development Learning Environment (IDLE) is suitable for Chapters 1 to 3. For Scientific Computing and the material in Chapters 4 to 10, the reader will need to use Jupyter notebooks or Spyder through Anaconda, or Google Colab, via cloud computing.
Each chapter provides both examples and exercises. to understand programming, the reader must attempt these exercises. Learning to program is like learning to ride a bike – you have to fall off many times before mastering the art. Expect to make many mistakes, learn from those mistakes, and then move on to the next chapter. Full working solutions to all of the exercises and other resources will be provided via GitHub, where readers will be able to download all files for free. There will also be a web page with full-worked solutions, where readers can simply copy and paste code and run the programs in a Python environment. Readers should note that Python programs can easily be generated with ChatGPT (Chat Generative Pre-trained Transformer), developed by OpenAI, and other alternatives such as Microsoft Bing, Perplexity AI, and Google Bard AI, for example. Readers should ask these AI chatbots why humans should learn how to program – they give some very sound arguments.
Chapter 1 shows the reader how Python can be used as a simple, powerful calculator, and the first library (or module) is introduced. The Math library consists of functions (written in Python) that can be called within Python. Some of the functions will be familiar to most readers (ASIN, sin, exp, gcd, lcm, sqrt, etc), and some unfamiliar functions (ceil, floor, fmod, radians, trunc) will be defined here. Chapter 2 starts with lists, tuples, sets, and dictionaries and then moves on to simple programming, defining functions (think of adding buttons to your Python calculator), loops, and conditional constructs (if, Elif, else). In Chapter 3, the turtle library is loaded into a notebook, and simple fractals (images repeated on ever-reduced scales) are plotted using recursive functions and iteration. Numerical Python (NumPy) and the Matrix Plotting Library (MatPLotLib) are used in Chapter 4 when dealing with arrays, matrices, vectors, tensors, and plots.
Python as a Powerful Calculator.
Simple Programming with Python.
The Turtle Library.
NumPy and MatPlotLib.
Google Colab, SymPy, and GitHub.
Python for Mathematics.
Google Colab, SymPy, and GitHub.
Python for Mathematics.
Introduction to Cryptography.
An Introduction to Artificial Intelligence.
An Introduction to Data Science.
An Introduction to Object-Oriented Programming.
  • Sign up or login using form at top of the page to download this file.
  • Sign up
Up