human
Sum of the numbers upto N that are divisible by 2 or 5 | Function to find the sum.
sum2 is sum of numbers divisible by 2.
sum5 is sum of number divisible by 5.
sum10 of numbers divisible by 2 and 5.
Driver code"
How can the above be solved in Python?

=====
Can you provide a code to sum of the numbers upto N that are divisible by 2 or 5 and the other steps required?
assistant
#Here is code to sum of the numbers upto N that are divisible by 2 or 5 and the other steps required.
 def findSum ( n ) :
	sum2 = ( ( n // 2 ) * ( 4 + ( n // 2 - 1 ) * 2 ) ) // 2
	sum5 = ( ( n // 5 ) * ( 10 + ( n // 5 - 1 ) * 5 ) ) // 2
	sum10 = ( ( n // 10 ) * ( 20 + ( n // 10 - 1 ) * 10 ) ) // 2
	return sum2 + sum5 - sum10 ;
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( int ( findSum ( n ) ) )