human
Find last digit in factorial | Python3 program to find last digit in factorial n ..
Explicitly handle all numbers less than or equal to 4.
For all numbers greater than 4 the last digit is 0.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to find last digit in factorial and the other steps required.
 def lastDigitFactorial ( n ) :
	if ( n == 0 ) : return 1
	elif ( n <= 2 ) : return n
	elif ( n == 3 ) : return 6
	elif ( n == 4 ) : return 4
	else : return 0
print ( lastDigitFactorial ( 6 ) )