Python Homework Solution on Fixing your Security Layer