TEST CODE TASK - Junior Python Django Developer - Remote
Solution for test task for Junior Python Developer
High season: June - September => GuestReady commission is 15% Other months: commission is 10%
Write a function that takes a date string in the format 'YYYY-MM-DD' and returns the commission: get_commission(date_str) -> float
Also, add a tests.
The solution code in Get_Commission_datetime.py is developed by using 'datetime' module and stackoverflow.com. It is easier solution and I've done it in short time. The function get_commission(date_str) is ready for import. Test1.py imports Get_Commission_datetime and uses get_commission() function to test valid and invalid inputs.