Beispiel #1
0
def problem_2():
	total_sum = 0
	f = fibonacci_generator()
	exceed_four_million = False
	while not exceed_four_million:
		next_number = f.next()
		if next_number > 4000000:
			exceed_four_million = True
		else:
			if next_number % 2 != 0:
				total_sum += next_number
	return total_sum