script for factorial and palindrom calculation