# program to find factorial of any number entered by the user print("To exit just Enter 'e' ") while True: a = 1 inp1 = input('Enter Number or Enter any alphabatic key to exit :') try: for i in range(int(inp1)): a *= (i+1) print(f'Factorial of {inp1} = {a}') except: break print('Have A nice Day!!\nThank U!!!')