Great contribution bro
it would be beneficial to separate code responsibilities into classes or methods, use more descriptive variable names, validate user input, handle exceptions more specifically, improve security, and separate the user interface from the business logic. These theoretical improvements would help improve code readability, modularity, security and maintainability.
Excellent