From 68baa2efd72cb150dd6138d7b208b2621bcfc431 Mon Sep 17 00:00:00 2001 From: thing 1 Date: Thu, 5 Dec 2024 12:04:08 +0000 Subject: made a load of stuff --- comp/work/40/test.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 comp/work/40/test.py (limited to 'comp/work/40') diff --git a/comp/work/40/test.py b/comp/work/40/test.py new file mode 100644 index 0000000..345de38 --- /dev/null +++ b/comp/work/40/test.py @@ -0,0 +1,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) -- cgit v1.2.3