summaryrefslogtreecommitdiff
path: root/comp/work/40/test.py
diff options
context:
space:
mode:
authorthing 1 <thing1@seacrossedlovers.xyz>2024-12-05 12:04:08 +0000
committerthing 1 <thing1@seacrossedlovers.xyz>2024-12-05 12:04:08 +0000
commit68baa2efd72cb150dd6138d7b208b2621bcfc431 (patch)
treefefde42e9df77384f9fa11adfa3efd3af73869d8 /comp/work/40/test.py
parent27e2e13679f57eb2bd139175216b1d5989e8dc6a (diff)
made a load of stuff
Diffstat (limited to 'comp/work/40/test.py')
-rw-r--r--comp/work/40/test.py27
1 files changed, 27 insertions, 0 deletions
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)