Untitled

mail@pastecode.io avatar
unknown
python
24 days ago
428 B
1
Indexable
Never
import random

if __name__ == '__main__':
    numbers = [random.randint(1, 100) for _ in range(10)]

    print(numbers)

    min_element = 101
    max_element = 0

    for number in numbers:
        if number < min_element:
            min_element = number

        if number > max_element:
            max_element = number

    print(f"Element max = {max_element}")
    print(f"Element min = {min_element}")
Leave a Comment