summaryrefslogtreecommitdiff
path: root/comp/work/40/test.py
blob: 345de38554066e460b3bb37bbe3804926a5de24f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
count = int(input("how many numbers will you input: "))
nums = []
for i in range(count):
    nums.append(int(input(f"num {i}: ")))

seen = []
seenicount = []
for i in range(len(nums)):
    seenicount.append(0)
    if nums[i] not in seen:
        for j in nums:
            if j == nums[i]:
                seenicount[i] += 1
        seen.append(nums[i])

highest = 0
multimodal = False
for i in seenicount:
    if i > highest:
        highest = i
    elif i == highest:
        multimodal = True

if (multimodal):
    print("data was multimodal")
else:
    print(highest)