import sys
import math
import random
def main():
# your code goes here
j = [1,1,2,3,5]
GMDN(j)
def GMDN(x):
n = 5
x = [1,1,2,3,5]
arithmetic = (x[0] + x[1] + x[2] + x[3] + x[4])/n
geometric = (x[0] * x[1] * x[2] * x[3] * x[4])**(1./n)
median = x[int((n)/2)]
my_list = [arithmetic,geometric,median]
my_list.sort()
print(my_list)
while(my_list[0] != my_list[1] and my_list[1] != my_list[2]):
n1 = (my_list[0] + my_list[1] + my_list[2])/3
n2 = (my_list[0] * my_list[1] * my_list[2])**(1./3)
n3 = my_list[int((3)/2)]
my_list = [n1,n2,n3]
my_list.sort()
print(my_list)
if __name__ == '__main__':
main()
I'm trying to write a code that uses a while loop with more than one condition but whenever I run the code it doesn't process both conditions and only does one. Anyone know why this happens?