This is the first exercise folder of this course. In this exercise, you'll familiarize yourself with the development environment and get everything set up.
You can use this sandbox folder to try out different things later on. When you encounter something new in the material, try it out in the sandbox first, and then solve the exercises on the topic.
This guide will assume you are using either a Linux environment or Windows Subsystem for Linux. If you are in a Linux environment, you can safely ignore the references to Windows directories.
You can find installation instructions for WSL here.
You will need administrative access to your machine and the ability to run PowerShell commands.
Choose Ubuntu 18.04 for your distro.
In this guide you will set up a folder called python-programming in Documents and use it for your development environment. We will also assume that your primary drive is C:\.
Go into your file explorer, find the Documents directory and right-click to create a New Folder called python-programming. Don't use spaces in the name of this directory.
Open up your WSL environment and enter the following command at the prompt:
mkdir python-programmingto create a new directory called python-programming in your WSL root folder.
Once this is done, type
cd python-programmingto enter the python-programming directory.
Hint: If you press Tab after typing pyt it will offer autocomplete suggestions.
Clone the sandbox and exercises repositories from Github using the following commands:
git clone https://github.com/den01-python-programming/sandbox/
git clone https://github.com/den01-python-programming/exercises/Type ls at the command prompt. You should see the following output:
sandbox exercises
You can use the sandbox repo to try things out in Python throughout this course. Think of it as a directory for testing things.
Enter the exercises directory using
cd exercisesType ls at the command prompt. You should see the following output:
README.md dl_exercises.sh exercise-list.dat
The dl_exercises.sh file uses the exercise-list.dat file to download each part's exercises from the repos. We can run the dl_exercises.sh script as follows:
./dl_exercises.shYou will be asked some questions as the script runs through depending on your scenario.
Once the exercise files for each part are downloaded, you can use this directory as your main development environment.
If you type ls at the prompt, you should now see the exercises that were downloaded by the script.
You can enter any of the directories using cd.
NB: This command will likely fail if you are working from your primary C:\ drive and it is formatted as NTFS. This is due to git clone being unable to run chmod on Windows directories under NTFS format. This is unfortunate, and a work-around is in the TO-DOs.
If you would like to examine the inner workings of this script, you can check it out using:
cat dl_exercises.shDon't worry too much at the moment about how this works - it will probably become clearer as you go through the course!