Learning Python

I started taking the Python Essential Training course from LinkedIn Learning. The challenges are getting harder and harder, but I managed to do them without any help. The codes I made were not the most efficient ones, but at least they did the jobs. Below are the codes I made for each challenge:

Description Code
Factorial

Gets the factorial of any integer.

Hex to decimal converter

Converts hexadecimal strings to decimals.

ASCII Art Compressor/Decompressor

Converts ASCII art to a list of tuples, and unpacks the output.

Prime Numbers Until Entered Number

Gets all the prime numbers up to the square root of the entered number, then gets all numbers that are not divisible by those prime numbers up to the entered number.

Chance to return data

A function that has a chance to return data. If data is not returned, the function recurs until data is returned. If recursions exceed the max retries, then the function notifies the user that the server is down.

Message Listeners

Classes that can collect the timestamps of when messages are sent, and print out the entire list of messages received.

Custom Errors

Code that captures errors and returns custom messages.

Comments