Thông tin

Tác giả Tanguy De Bels
Hạn chót Không có hạn chót
Giới hạn nộp bài Không có giới hạn
Các tag chuyên mục session1

Đăng nhập

Session 1: Median

Suppose the variables a, b and c contain a natural number.

Write a code fragment that assigns to the variable median the median value of these numbers.

As a reminder, the median of three values is the value such that there is exactly one value lower than (or equal to) it and one value higher than (or equal to) it.


Implementation
a = ... #variable to evaluate
b = ... #variable to evaluate
c = ... #variable to evaluate
median = ... #store in this variable the median of the three variables