https://github.com/gabrioliv/python-general-scripts-exercises
Some Python Scripts and Exercises
https://github.com/gabrioliv/python-general-scripts-exercises
exercises learning programming pytest python python-exercises python310 scripts testing
Last synced: 2 months ago
JSON representation
Some Python Scripts and Exercises
- Host: GitHub
- URL: https://github.com/gabrioliv/python-general-scripts-exercises
- Owner: GabriOliv
- Created: 2021-02-03T15:55:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T07:13:00.000Z (12 months ago)
- Last Synced: 2025-01-08T10:10:59.270Z (4 months ago)
- Topics: exercises, learning, programming, pytest, python, python-exercises, python310, scripts, testing
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Python (Scripts and Exercises)](https://github.com/GabriOliv/python-general-scripts-exercises)
Some Python Scripts and Exercises
[](https://www.python.org/downloads/)
---
## Python Exercises from [Practice Python](https://www.practicepython.org/)
| Scripts | Exercises | Tests |
| :---: | :--- | :---: |
| ex_01.py | [1: Character Input][exerc001] | ✅ |
| ex_02.py | [2: Odd Or Even][exerc002] |
| ex_03.py | [3: List Less Than Ten][exerc003] |
| ex_04.py | [4: Divisors][exerc004] |
| ex_05.py | [5: List Overlap][exerc005] |
| ex_06.py | [6: String Lists][exerc006] |
| ex_07.py | [7: List Comprehensions][exerc007] |
| ex_08.py | [8: Rock Paper Scissors][exerc008] |
| ex_09.py | [9: Guessing Game One][exerc009] |
| ex_10.py | [10: List Overlap Comprehensions][exerc010] |
| ex_11.py | [11: Check Primality Functions][exerc011] |[comment]: <> ( to do list
| ex_12.py | [12: List Ends][exerc012] |
| ex_13.py | [13: Fibonacci][exerc013] |
| ex_14.py | [14: List Remove Duplicates][exerc014] |
| ex_15.py | [15: Reverse Word Order][exerc015] |
| ex_16.py | [16: Password Generator][exerc016] |
| ex_17.py | [17: Decode A Web Page][exerc017] |
| ex_18.py | [18: Cows And Bulls][exerc018] |
| ex_19.py | [19: Decode A Web Page Two][exerc019] |
| ex_20.py | [20: Element Search][exerc020] |
| ex_21.py | [21: Write To A File][exerc021] |
| ex_22.py | [22: Read From File][exerc022] |
| ex_23.py | [23: File Overlap][exerc023] |
| ex_24.py | [24: Draw A Game Board][exerc024] |
| ex_25.py | [25: Guessing Game Two][exerc025] |
| ex_26.py | [26: Check Tic Tac Toe][exerc026] |
| ex_27.py | [27: Tic Tac Toe Draw][exerc027] |
| ex_28.py | [28: Max Of Three][exerc028] |
| ex_29.py | [29: Tic Tac Toe Game][exerc029] |
| ex_30.py | [30: Pick Word][exerc030] |
| ex_31.py | [31: Guess Letters][exerc031] |
| ex_32.py | [32: Hangman][exerc032] |
| ex_33.py | [33: Birthday Dictionaries][exerc033] |
| ex_34.py | [34: Birthday Json][exerc034] |
| ex_35.py | [35: Birthday Months][exerc035] |
| ex_36.py | [36: Birthday Plots][exerc036] |
)[exerc001]:
[exerc002]:
[exerc003]:
[exerc004]:
[exerc005]:
[exerc006]:
[exerc007]:
[exerc008]:
[exerc009]:
[exerc010]:
[exerc011]:
[exerc012]:
[exerc013]:
[exerc014]:
[exerc015]:
[exerc016]:
[exerc017]:
[exerc018]:
[exerc019]:
[exerc020]:
[exerc021]:
[exerc022]:
[exerc023]:
[exerc024]:
[exerc025]:
[exerc026]:
[exerc027]:
[exerc028]:
[exerc029]:
[exerc030]:
[exerc031]:
[exerc032]:
[exerc033]:
[exerc034]:
[exerc035]:
[exerc036]:---
## How install and run the scripts
1. git clone the project
2. cd into the project
```sh
cd python-general-scripts-exercises
```
3. Start a venv (virtual environment)
```sh
python3.10 -m venv env
```
4. Activate the venv
```sh
source env/bin/activate
```
5. Install the requirements
```sh
pip3.10 install -r requirements.txt
```
6. Run the tests
```sh
clear; PWDEBUG=1 pytest -vx
```
7. If all pass, run the scripts
```sh
python3.10 NAME_OF_THE_SCRIPT.py
```
8. To deactivate the venv
```sh
deactivate
```### Run Coverage
Run the coverage with pytest and show the missing lines
```sh
coverage run -m pytest; coverage report --show-missing
```---