This assignment will setup your base Python enviroment. If you already have it, simply run challenges and answer questions (if any). If you cannot run challenges, set up the needed software.
- Windows *CMD.EXE* is no option. *Powershell* is not recommended since it is not compatible with Unix standards.
- Follow
[instructions](../Cygwin_setup.md)
for setting up *cygwin*.
Open a terminal and type commands:
```sh
>ls-la
>pwd
>whoami
>cat ~/.profile
>cat ~/.bashrc
>echo$PATH
```
Explain commands. If you are not familiar, find out about these basic Unix shell (bash, zsh, ...) commands (e.g. from [introduction](https://cs.lmu.edu/~ray/notes/bash) or
On *Mac*, refer to file *.zshrc* instead of *.bashrc*.
(4 Pts)
### 2.) Challenge 2: Python3
Check if you have Python 3 installed on your system. Name three differences between [Python 2 and 3](https://www.guru99.com/python-2-vs-python-3.html#7).
Run commands in terminal (exact version 3.x.x may vary):
```sh
> python --version
Python 3.12.0
```
(2 Pts)
### 3.) Challenge 3: pip
Check if you have a Python package manager installed (pip, conda, ... ). [`pip`](https://pip.pypa.io) is Python's default package manager needed to install additional python packages and libraries.
Follow [instructions](https://pip.pypa.io/en/stable/installing) for installation:
-[download](https://bootstrap.pypa.io/get-pip.py) the `get-pip.py` file.
- run `python get-pip.py`
- or update pip to latest version: `python -m pip install --upgrade pip`
Run commands in terminal:
```sh
> pip --version
pip 23.2.1 from C:\Users\svgr2\AppData\Local\Programs\Python\Python312\Lib\site-
Run the file. Output varies depending on your system.
```
> python print_sys.py
Python impl: CPython
Python version: 10.0.19045
Python machine: AMD64
Python system: Windows
Python version: 3.12.0
```
(2 Pts)
### 5.) Challenge 5: Python built-in functions
Learn about Python's [built-in functions](https://docs.python.org/3/library/functions.html). Test the [*globals()*](https://docs.python.org/3/library/functions.html#globals) function.