arr = [10, 89, 9, 56, 4, 80, 8]
      mini = arr[0]
      maxi = arr[0]
      for i in range(len(arr)):
        if arr[i] < mini:
          mini = arr[i]
        if arr[i] > maxi:
          maxi = arr[i]
      print (mini)
      print (maxi)
      
      Python language logo

      Find the Smallest and largest element

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.