Skip to content

Instantly share code, notes, and snippets.

View Salma175's full-sized avatar
🏠
Working from home

Salma Shaik Salma175

🏠
Working from home
View GitHub Profile
@Salma175
Salma175 / task_1.py
Created June 2, 2026 05:16
Find the Most Frequent Number
# List of numbers
numbers = [1,2,3,3,3,4,4,5]
# numbers = [1,2,2,3,4,4]
# numbers = [1,2,3,4,5]
print("List: ", numbers)
print("------")
# Step 1 : Creat an empty dictionary to track occurances
# {number : number_of_times_it_occurred} -> {1 : 1, 2 : 1, 3 : 3, .....}