Have you ever wondered if you there were a way to buy each year the latest iPhone and spending less than changing it every 2 years?
Well, there is and it's very simple, you just buy the latest iPhone every year (in the same price range) and you sell the one you already have on Swappie. In this way you will pay the new iPhone around 10-15% the official price. Because iPhones are devices which keep their value and have a huge second hand market. This script proves this assumption and tells you how much you would save by implementing this approach.
To create this script I retrieved second hand iPhone prices from Swappie using web scraping with BeautifulSoup4 (BS4). Then, I wrote the logic to calculate the cumulative savings. I structured the whole codebase using Object Oriented Programming when I wanted to write more modular and maintainable code. Moreover, I used procedural programming while setting up the command line interface, in which code modularity and maintainability was not the main goal.