PFP191_-_FA_2023_-_PE_939.webp
H

PFP191_-_FA_2023_-_PE_939.webp

  • Media owner Havoc93
  • Ngày thêm
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
Chưa có bình luận nào.

Thông tin

Category
PFP191
Thêm bởi
Havoc93
Ngày thêm
Lượt xem
1,417
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PFP191_-_FA_2023_-_PE_939.webp
File size
78.7 KB
Dimensions
1552px x 621px

Share this media

Back
Bên trên Bottom