Find the Smallest and largest element

    0

    0

    CrypticSai-08

    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)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.