Skip to content

phume03/Level-Up-Python

Repository files navigation

Python Challenges (Level Up)

Level Up Python by LinkdedIn Learning

A part of this repository contains my solutions to the challenges presented in the LinkedIn Learning course Level Up: Python. They are as follows:

  1. Prime Factors: produce the prime factorization of a given number

  2. Palindrome: determine if a given string/phrase/sentence is a palindrome

  3. Sort String: alphabetically sort the words in a given phrase/sentence (ignoring case)

  4. 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

  5. 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.

  6. Save a Dictionary: save a dictionary to disk and load the dictionary from disk.

  7. Schedule a Function:

  8. Send an Email

  9. Simulate Dice

  10. Count Unique Words

  11. Generate a Password

  12. Merge CSV Files

  13. Solve a Sudoku

  14. Build a Zip Archive

  15. Download Sequential Files

Matthew Whiteside's Python Programming Puzzles

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.

Challenge Puzzles

  1. Filter Strings: filter a list of strings by strings containing the letter "a". Parametrized tested.

  2. 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.

  3. Sum Even:

50+ puzzles

Fun Puzzles

Others

  1. 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.

  2. 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.

Requirements

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.

How to Run Examples

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.

License

This project is distributed under the GPL license. See LICENSE for more information.

Resources

About

These concise challenges let you stretch your brain and test your talents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages