Learning Goal: I’m working on a computer science question and need guidance to help me learn.
Write a program that calculates the sum of all even numbers in a given range. The program should prompt the user to enter the lower and upper bounds of the range. The program should then use a loop to iterate through all numbers in the range, and add up only the even numbers. The program should output the sum of the even numbers.
Implement the program in both Python and C++. Compare and contrast the two implementations in terms of syntax, readability, and performance. Which language do you think is better suited for this task, and why?