Answers for "find the largest multiple of 3 from array of digits python"

1

python find in largest 3 numbers in an array

array = [1, 2, 3, 4, 5, 6, 7, 8, 9, ]
result = []
num = int(input('Enter N: '))

for x in range(0, num):
    largeNum = 0
    for y in range(len(array)):
        if array[y] > largeNum:
            largeNum = array[y]
    array.remove(largeNum)
    result.append(largeNum)

print(result)
Posted by: Guest on October-31-2020

Code answers related to "find the largest multiple of 3 from array of digits python"

Python Answers by Framework

Browse Popular Code Answers by Language