Find Largest element in an array

    0

    0

    CrypticSai-08

    a = [10, 89, 9, 56, 4, 80, 8]
    max_element = a[0]
    for i in range(len(a)):
      if a[i] > max_element:
         max_element = a[i]
    print (max_element)
    
    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.