A Simple Introduction to Python

Автор: literator от 13-04-2024, 03:18, Коментариев: 0


Название: A Simple Introduction to Python
Автор: Stephen Lynch
Издательство: CRC Press
Серия: The Python Series
Год: 2024
Страниц: 113
Язык: английский
Формат: pdf (true)
Размер: 21.4 MB

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 to 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. In order 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) which 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.


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.

Скачать A Simple Introduction to Python

Нашел ошибку? Есть жалоба? Жми!
Пожаловаться администрации
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.