diff --git a/13/8 - a la Mode.py b/13/8 - a la Mode.py new file mode 100644 index 0000000..bf637a9 --- /dev/null +++ b/13/8 - a la Mode.py @@ -0,0 +1,7 @@ +def mode(L): + frequency = [0]*10 + for i in L: + frequency[i] = frequency[i] + 1 + for i in range(0, 10): + if frequency[i]==max(frequency): + return i