Python3 Programming - Exercise 0 - Introduction and Setup
Tags: python, beginners, tutorial, programming
Published: 2020-12-01 19:11:49

## Set up

Guido van Rossum and the python community, made it possible, through Brian Kernighan and Dennis Ritchie, for anyone with the least interest in learning how to instruct a computer to perform some tasks, the opportunity to do so. We dream that many would also learn how to code by introducing them to programming in Python from ground zero.

## Aim

After reading this book and doing almost all the exercises and projects, the reader would muster, in the end, the sense and skill to write programs using Python and would be able to adapt or translate the concept to other programming languages.

## Who is the book meant for

This book is suited for individuals from any line of work, novice to expert, first-timers - beginners to veterans. We trust that this book will be a good read for anyone who gets hold of this book who could speak, read and understand English that is, can hold a conversation in the English language. Let me know if you want to translate this book to another language.

## Prerequisite

We expect the reader to be patient, determined, committed, genuine and not necessarily passionate but interested in programming. The reader must have a platform for writing code, such as a laptop, desktop, which we recommend greatly, a tablet or a smartphone. Whatever knowledge the reader may have is a plus.

## Set up an environment

The code presented in this book would run on any operating system. The reader may need a development environment which we shall use to write and test the code.

There are three ways to set up, either is okay as far as the reader is confident in the environment chosen. We assume the user is using a PC.

### Installing Python

Install Python from the [Python website][python-site]. Windows user may refer to this [video][python-on-windows] for assistance.

#### Unix and Linux users

Unix and Linux user may have Python already installed on their PC. To test whether you have Python installed, open the terminal (command-line) and type, `python` then hit enter. For the Linux users, also do for `python3` since we are interested in the features of `python3`. Something like,

```Python
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> |
```

Then we are good to go. Just make sure that Python 3.x.x used.

Copy and past, `"Hello there.."` and press enter. What did you see?

You should see,

```Python
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> "Hello there.."
'Hello there..'
>>> |
```

### IDE: Pycharm

IDE stands for Integrated Development Environment. It comprises of a text editor and the interpreter bundled and shipped together. We recommend Pycharm if you choose to use an IDE. Download it [here][pycharm-site].

### IDLE: Python's - windows

Windows users may have access to the default IDLE that comes packaged with Python.

### Text Editor and command-line: vscode

At this option, the user has a terminal (command-line, shell ) and a text editor such as notepad, notepad++, sublime, vscode, nano, vim, etc. So the user makes use of the editor and interpreter through the terminal. We recommend vscode as it has the terminal inside the text editor. Install vscode from [here][vscode-site].

## Note

It is a little bit hard to navigate through the directories as a beginner. If the user insists on using the command-line and text editor, we recommend the watch this [video][windwos-cmd-site] for windows user and this [video][unix-linux-cmd-site] for Linux users. There is more also [here][advanced-cmd]. You can also reference our [commandline][cli-presentation] presentation, using Powershell as administrator on windows.

### Structure of the book

This book uses exercises instead of chapters, which should be the same. The book has five parts:

1. Exercise 1 to 8 covers the fundamentals.
1. Exercise 9 to 13 covers some operators, loops and functions.
1. Exercise 14 to 17 covers some built-in data structures.
1. Exercise 18 to 22 covers some exceptions, file handling, OOP, modules and unit testing.
1. Exercise 23 to 25 covers Git, SQL and SQLite3.

## How to read this book

We recommend the reader reads through each exercise based on the major divisions. Like any other skill, it requires time to muster, so spend as much time as needed to complete each practical diligently. Your best technique here id to understand the concept before moving on. We recommend you glance through the book before actually reading it. Do that, and it may help.

- First-timers do require the fundamentals.
- Experienced but new to Python, should skim through the fundamentals.

## How to get assistance reading this book

Get assistance reading this book from [Swift Python][swift-python-site] GitHub page or send us an email at <mailto:popecan1000@gmail.com>, with the subject as `swift-python assistance`. There are other programming platforms on telegram, Facebook or even copy and paste the error into google or just googling the problem, checking StackOverflow. For beginners, find a coding buddy.

## Feedback

We have worked diligently through this book. A typo or misinterpretation of a concept may be lurking somewhere. So readers may send us feedback by creating an [issue] or comment on it on [Swift Python][swift-python-site] GitHub page, open an issue. Readers may send a pull request too. Therefore we are opened to suggestions on improvement in any form.

#

[python-site]: https://www.python.org/downloads/
[python-on-windows]: https://www.youtube.com/results?search_query=how+to+install+Python+on+windows
[vscode-site]: https://code.visualstudio.com/
[pycharm-site]: https://www.jetbrains.com/pycharm/download/
[windwos-cmd-site]: https://www.youtube.com/watch?v=MBBWVgE0ewk&list=PL6gx4Cwl9DGDV6SnbINlVUd0o2xT4JbMu
[unix-linux-cmd-site]: https://www.youtube.com/watch?v=IVquJh3DXUA
[advanced-cmd]: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGCkg2uj3PxUWhMDuTw3VKjM
[swift-python-site]: https://github.com/Otumian-empire/swift-python
[issue]: https://github.com/Otumian-empire/swift-python/issues/new
[cli-presentation]: https://github.com/Otumian-empire/CLI-presentation