human
Give me a code to sum of integers upto N with given unit digit and the other steps required given the following:
Sum of integers upto N with given unit digit | Function to return the required sum.
If the unit digit is d.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to sum of integers upto N with given unit digit and the other steps required.
 def getSum ( n , d ) :
	sum = 0 ;
	for i in range ( n + 1 ) :
		if ( i % 10 == d ) :
			sum += i
	return sum
if __name__ == " _ _ main _ _ " :
	n , d = 30 , 3
	print ( getSum ( n , d ) )