Python code for IT261 group project