This is a GUI application however, the functions interact directly with the user through the console.
you should restructure your functions so that :
All the data they need is passed as parameters to the function.
You should return the result of your function either as a return variable ( for example: a dictionary) or an output file (preferably JSON), instead of the output being logged to the console.
These functions should not call the system to terminate the entire program, what if we want to handle this error in a certain way?? Try raising exceptions.
@NourhanWaleed
This is a GUI application however, the functions interact directly with the user through the
console
. you should restructure your functions so that :