Question 02 (3 marks)
The given file Q2.py already contains statements to input data for the variables named x, and y (x, y >=2and x can be greater than y or x smaller than y). You should write statements to calculate the average of the primes from x to y (or y to x). If no primes are found, return 0 RFLOW.COM
BOVERFLOW
Notes:
- You can create new functions if you see it is necessary.
- Do not edit given statements in the main function.
- The output value is formatted in two decimal places.
Sample input and output:
-Input:x=2
y = 10
After processing: (2+3+5+7)/4 = 4.25
Output for marking:
OUTPUT:4.25
-Input:x = 10 y=5
After processing: (5+7)/2 =6.00