from random import randint

length = int(input(f"Intup length of array: "))
array = []

for i in range(length):
    item = randint(-100, 100)
    array.append(item)

print(array)

def find_max_item_and_its_index_in_list(array):
    maximum = array[0]
    max_index = 0
    index = 0

    while index < len(array):
        if array[index] > maximum:
           maximum = array[index]
           max_index = index
        index += 1

    return {
        "maximum": maximum,
        "max_index": max_index
    }

print(find_max_item_and_its_index_in_list(array))