I need the code that solve each questions with the script of the code so I can r

I need the code that solve each questions with the script of the code so I can run it on Google Collab to test , also a detailed explanation under each questions
for example
Part2: Solving the Problem
## THE CODE IN PYTHON
### EXPLINE WHAT YOU DID IN DETAILS AND WHY

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount