A part of this repository contains my solutions to the challenges presented in the LinkedIn Learning course Level Up: Python. They are as follows:
-
Prime Factors: produce the prime factorization of a given number
-
Palindrome: determine if a given string/phrase/sentence is a palindrome
-
Sort String: alphabetically sort the words in a given phrase/sentence (ignoring case)
-
Find All List Items: find all the indices (indexes) of a given word/item in a list. Include nested references to the word in the sublists of the initial list
-
Play the Waiting Game: use python time to determine if a user playing a game follows a simple instruction or game prompt to wait a random number of seconds between two to four seconds.
-
Save a Dictionary: save a dictionary to disk and load the dictionary from disk.
-
Schedule a Function:
-
Send an Email
-
Simulate Dice
-
Count Unique Words
-
Generate a Password
-
Merge CSV Files
-
Solve a Sudoku
-
Build a Zip Archive
-
Download Sequential Files
The other part contains solutions to a collection of puzzles curated by MatWhiteside. The code here was not cloned from Whiteside's repo but you can visit that repo to get skeleton/scaffold code and solutions to the puzzles as presented in the book. This code was created using python3.x (>3.12), and VSCode.
-
Filter Strings: filter a list of strings by strings containing the letter "a". Parametrized tested.
-
Sum Under 50: sum up two integers if their total is less than 50. Parameterized tested for illegal inputs/negative test cases, and edge cases.
-
Sum Even:
50+ puzzles
-
String Punctuation: defines functions that take in an input string and return true if the string contains a punctuation, and false if it doesn't.
-
Running Averages: defines functions that take in an (x,y) data set and produce an (x,y,y1) tuple, where y1 is the running average of y.
For these modules to work, you will need to have Python >= 3.12. Then you need to install the pytest library. You can do this by using pip
, and you can run it in a Python virtual environment so as not to affect your system files (especially if your system will be using a lower version of python in general):
$ python -m venv devenv
$ source devenv/bin/activate
$ python -m pip install pytest
You really can run the examples without pytest, but you will need it to run the automated test cases.
To run scripts or modules from your system's command line or terminal, execute the following command:
$ python <script-name>.py
Run this from the project directory and it will automatically pick pycalc to install in editable mode.
This project is distributed under the GPL license. See LICENSE
for more information.