I have been stuck for the past week on a problem resulting in various error messages according to the different solutions I could think of or tried to implement by searching the web.Here is the python code :