human
Can you provide a code to sum of first n even numbers and the other steps required given the following:
Sum of first n even numbers | function to find sum of first n even numbers.
sum of first n even numbers.
next even number.
required sum.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to sum of first n even numbers and the other steps required.
 def evensum ( n ) :
	curr = 2
	sum = 0
	i = 1
	while i <= n :
		sum += curr
		curr += 2
		i = i + 1
	return sum
n = 20
print ( " sum ▁ of ▁ first ▁ " , n , " even ▁ number ▁ is : ▁ " , evensum ( n ) )