Python Made Easy: A First Course in Computer Programming Using Python
By Kevin Wilson
()
Kevin Wilson
Kevin Wilson is the New York Times bestselling author of five novels, including Now Is Not the Time to Panic, Nothing to See Here, and The Family Fang, as well as two story collections. His work has received the Shirley Jackson Award and been selected as a Read with Jenna book club pick. He lives in Sewanee, Tennessee, with his wife and two sons.
Read more from Kevin Wilson
The Gospel Singer Rating: 4 out of 5 stars4/5Administrative Assistant's and Secretary's Handbook Rating: 4 out of 5 stars4/5The AMA Handbook of Business Documents: Gudielines and Sample Documents That Make Busienss Writing Easy Rating: 0 out of 5 stars0 ratingsNothing to See Here: A Novel Rating: 4 out of 5 stars4/5The Bird's Nest Rating: 0 out of 5 stars0 ratingsThe Family Fang: A Novel Rating: 4 out of 5 stars4/5The AMA Handbook of Business Writing: The Ultimate Guide to Style, Grammar, Punctuation, Usage, Construction and Formatting Rating: 0 out of 5 stars0 ratingsThe Way of Chai: Recipes for a Meaningful Life Rating: 0 out of 5 stars0 ratingsBlood and Fears Rating: 4 out of 5 stars4/5Gospel Shaped Emotions: Learning to Lay Our Emotions Down at the Cross of Jesus Rating: 0 out of 5 stars0 ratingsHandbook of Strategic Account Management: A Comprehensive Resource Rating: 0 out of 5 stars0 ratingsUsing Excel - 2023 Edition: The Step-by-step Guide to Using Microsoft Excel Rating: 0 out of 5 stars0 ratingsExploring Windows 11 - 2023 Edition Rating: 5 out of 5 stars5/5Exploring Apple Mac - MacOS Sonoma Edition: The Illustrated, Practical Guide to Using MacOS Rating: 0 out of 5 stars0 ratingsMen of Air Rating: 0 out of 5 stars0 ratingsEssential Computing: Concepts of ICT Rating: 0 out of 5 stars0 ratingsExploring Microsoft Office - 2023 Edition: The Illustrated, Practical Guide to Using Office and Microsoft 365 Rating: 0 out of 5 stars0 ratingsExploring Apple Mac - Sequoia Edition: The Illustrated, Practical Guide to Using MacOS Rating: 0 out of 5 stars0 ratingsExploring Windows 11 - 2024 Edition: The Illustrated, Practical Guide to Using Microsoft Windows Rating: 0 out of 5 stars0 ratingsEssential iPad iOS 12 Edition: The Illustrated Guide to Using your iPad Rating: 5 out of 5 stars5/5Essential Office 365 Third Edition: The Illustrated Guide to Using Microsoft Office Rating: 5 out of 5 stars5/5Airborne in 1943 Rating: 4 out of 5 stars4/5Essential Android Tablets: The Illustrated Guide to Using Android Rating: 0 out of 5 stars0 ratingsExploring Microsoft Office - 2020 Edition: The Illustrated, Practical Guide to Using Office and Microsoft 365 Rating: 0 out of 5 stars0 ratingsComputer Jargon: The Illustrated Glossary of Basic Computer Terminology Rating: 0 out of 5 stars0 ratingsEssential Computer Hardware: Understanding the Building Blocks of Modern Technology and Securing Your Digital World Rating: 0 out of 5 stars0 ratingsUsing Microsoft PowerPoint - 2023 Edition: The Step-by-step Guide to Using Microsoft PowerPoint Rating: 0 out of 5 stars0 ratings
Related to Python Made Easy
Related ebooks
Python Made Easy: A First Course in Computer Programming using Python Rating: 0 out of 5 stars0 ratingsAbsolute Beginner's Python Programming: The Illustrated Guide to Learning Computer Programming Rating: 1 out of 5 stars1/5Python for Beginners Rating: 0 out of 5 stars0 ratingsMastering Flask Rating: 0 out of 5 stars0 ratingsPython Crash Course for Beginners Rating: 0 out of 5 stars0 ratingsPython Programming for Newbies Rating: 0 out of 5 stars0 ratingsLearning Yii Testing Rating: 1 out of 5 stars1/5IPython Notebook Essentials Rating: 0 out of 5 stars0 ratingsModular Programming with Python Rating: 0 out of 5 stars0 ratingsPython Programming: Learn, Code, Create Rating: 0 out of 5 stars0 ratingsLearning Website Development with Django Rating: 0 out of 5 stars0 ratingsPython and SQL Bible: From Beginner to World Expert: Unleash the true potential of data analysis and manipulation. Rating: 0 out of 5 stars0 ratingsGetting Started with React Native Rating: 4 out of 5 stars4/5Computer Programming JavaScript, Python, HTML, SQL, CSS Rating: 0 out of 5 stars0 ratingsMastering Embedded Linux Programming - Second Edition Rating: 4 out of 5 stars4/5Elegant Python: Simplifying Complex Solutions Rating: 0 out of 5 stars0 ratingsPython Programming for Kids: Fun and Easy Guide to Building Your First Programs Rating: 0 out of 5 stars0 ratingsPython Simplified: Learn Programming Through Practical Examples Rating: 0 out of 5 stars0 ratingsCentOS System Administration Essentials Rating: 0 out of 5 stars0 ratingsPython Mini Manual Rating: 0 out of 5 stars0 ratingsMaster Python Without Prior Experience Rating: 0 out of 5 stars0 ratingsHands-On Python for DevOps: Leverage Python's native libraries to streamline your workflow and save time with automation Rating: 0 out of 5 stars0 ratingsPython Programming: A Hands-On Guide: Hello World E-books STEM, #1 Rating: 0 out of 5 stars0 ratingsPython The Complete Reference: Comprehensive Guide to Mastering Python Programming from Fundamentals to Advanced Techniques Rating: 0 out of 5 stars0 ratingsPython for Everyone: A Complete Guide to Coding, Data, and Web Development: Your Guide to the Digital World, #3 Rating: 0 out of 5 stars0 ratingsPython 3 Object Oriented Programming Rating: 4 out of 5 stars4/5
Programming For You
Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsPython Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5HTML in 30 Pages Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 5 out of 5 stars5/5Beginning Programming with C++ For Dummies Rating: 4 out of 5 stars4/5Microsoft Azure For Dummies Rating: 0 out of 5 stars0 ratingsiPhone For Dummies Rating: 0 out of 5 stars0 ratingsHacking Electronics: Learning Electronics with Arduino and Raspberry Pi, Second Edition Rating: 0 out of 5 stars0 ratingsSQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Teach Yourself C++ Rating: 4 out of 5 stars4/5Python Data Structures and Algorithms Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsAlgorithms For Dummies Rating: 4 out of 5 stars4/5C Programming Language Essentials Rating: 4 out of 5 stars4/5
Reviews for Python Made Easy
0 ratings0 reviews
Book preview
Python Made Easy - Kevin Wilson
About the Author
With over 20 years’ experience in the computer industry, Kevin Wilson has made a career out of technology and showing others how to use it. After earning a master’s degree in computer science, software engineering, and multimedia systems, Kevin has held various positions in the IT industry including graphic & web design, programming, building & managing corporate networks, and IT support.
He serves as senior writer and director at Elluminet Press Ltd, he periodically teaches computer science at college, and works as an IT trainer in England while researching for his PhD. His books have become a valuable resource among the students in England, South Africa, Canada, and in the United States.
Kevin’s motto is clear: If you can’t explain something simply, then you haven’t understood it well enough.
To that end, he has created the Exploring Tech Computing series, in which he breaks down complex technological subjects into smaller, easy-to-follow steps that students and ordinary computer users can put into practice.
Acknowledgements
Thanks to all the staff at Luminescent Media & Elluminet Press for their passion, dedication and hard work in the preparation and production of this book.
To all my friends and family for their continued support and encouragement in all my writing projects.
To all my colleagues, students and testers who took the time to test procedures and offer feedback on the book
Finally thanks to you the reader for choosing this book. I hope it helps you gain a better understanding of Python Programming.
Have fun!
Getting Started
The aim of this book is to provide a first course in the use of a methodical and effective approach to the development of computer programs using the Python Programming Language.
Chapters have been deliberately kept short with a learn by doing approach. Along the way, you’ll find various video tutorials and demonstrations you can access using the various links throughout the book.
Chapter by chapter, we’ll explore the ins and outs of Python with illustrations, worked examples, lab exercises and projects for you to complete yourself. For this purpose, we’ve included all the source code for this book in the following repository:
elluminetpress.com/python2
Have Fun!
What is Python
Python is a high-level programming language created by Guido van Rossum and first released in 1991. The name Python
was inspired by Guido’s love for the British comedy series Monty Python’s Flying Circus
.
Python emphasizes code readability and aims to provide a clear and concise syntax, making it easier for programmers to express concepts and ideas in fewer lines of code compared to other programming languages. There is also a comprehensive library that provides a wide range of built in modules and functions for common programming tasks. This philosophy encourages the reuse of existing code and reduces the need for developers to rely heavily on third-party libraries for basic functionalities. Over the years, Python has attracted a large community of developers who contribute to its extensive ecosystem of third-party libraries and frameworks, further expanding its capabilities.
Python is designed to be a versatile language and is widely used in web development, data analysis, artificial intelligence, scientific computing, and automation.
Installing Python
In this section, we’ll take a look at how to install the python interpreter and development environment.
Python has multiple versions available, such as Python 2.x and Python 3.x. It is recommended to install the latest stable version, which is Python 3.x. Python 2.x is no longer actively supported, and most new projects and libraries are designed for Python 3.x.
You can install python on Windows, Mac, or linux.
Install on Windows
In our lab, we’re using windows workstations, so we’ll need to install the Python Development Environment for Windows.
Open your web browser and navigate to the following website:
www.python.org/downloads/windows
From the downloads page, select the ‘executable installer’ of latest stable release.
Click ‘run’ when prompted by your browser. Or click ‘python-x.x.x-amd64.exe’ if you’re using Chrome.
Once the installer starts, make sure ‘add python 3.x to path’ is selected, then click ‘customize installation’ to run through the steps to complete the installation.
Make sure you select all the tick boxes for all the optional features. Click ‘next’.
Make sure ‘install for all users’ is selected at the top of the dialog box. Click ‘install’ to begin.
Click ‘disable path length limit’ to make sure Python runs smoothly on Windows and allow long file names.
Click ‘close’ to finish the installation.
You’ll find the Python Development Environment (IDLE) and the Python interpreter, in the Python folder on your start menu.
Install on MacOS
To install Python 3 with the Official Installer, open your web browser and navigate to the following website
www.python.org/downloads/macos
Click download python.
You’ll find the package in your downloads folder. Double click on the package to begin the installation
Run through the installation wizard. Click ‘continue’.
Once the installation is complete, you’ll find python in the applications folder in finder, or on the launch pad.
Install on Linux
If you are running a linux distribution such as Ubuntu or have a Raspberry Pi, you can install python using the terminal. You’ll find the terminal app in your applications. You can also press Control Alt T on your keyboard.
At the terminal command prompt, type the following commands. Press enter after each line.
sudo apt update
sudo apt upgrade
Type the following command to install Python.
sudo apt install python3 -y
Once the Python is installed, we need to install IDLE, the development environment. To do this, type the following command at the prompt
sudo apt-get install idle3 -y
Once installed, you’ll find IDLE in your applications.
Or you can type the following command at the prompt
idle
Setting up a Development Environment
A good development environment enhances productivity by providing features such as code editing, debugging, and testing capabilities.
There are several code editors and Integrated Development Environments (IDEs) available for Python programming. Once you have installed the python interpreter as discussed above, you should install a code editor or IDE. What you choose is personal preference and depends on the specific requirements of your project.
Try a few difference ones until you find the one that suits your needs the best.
Code Editor vs IDE
A code editor is a lightweight tool focused primarily on editing code. It provides features such as syntax highlighting, code completion, and basic code formatting. Some popular code editors are Visual Studio Code and Sublime Text.
An IDE is a comprehensive software suite that combines a code editor with additional tools and features specifically designed for software development. In addition to code editing capabilities, IDEs typically provide features like debugging, code refactoring, project management, and version control integration. Examples of popular IDEs include PyCharm, IDLE and