Epilepsy is a kind of brain disorder. It is a medical condition in which incorrect electrical signals are sent…