Fix bug: check valid user input
Merge branch 'master' of https://github.com/tirte12345/python