while loop - Mode of a List - Python -
I am trying to write my own function which finds mode in the list, But this sptter occurs when there are multiple modes to help me add something to a function, which is related to the case in many ways. thank you in advanced!
DEIF Modellist (AIM): subscript = 0 while subscript & lt; Lane (nums): If nums.count (nums [subscript]) & gt; Nums.count (nums [subscript + 1]): Return is "mode" + str (nums [subscript]) + "." Other: subscript + = 1 print mode list ([2,4,6,8,6,8])
Comments
Post a Comment