#find the smallest element in an array
#Approach:
#Sort the array in ascending order.
arr = [2,5,1,3,0]
# sorted method
my_arr = sorted(arr)
print(f"The smallest number is {my_arr[0]}")
#* USING FOR LOOP
smallest = arr[0]
for i in range(0,len(arr)):
if arr[i] < smallest :
smallest = arr[i]
print(f"The smallest number is {smallest}")