LU05.L02 Kleinste und grösste Zahl finden

numbers = [18, 3, 21, 1, 79, 35, 7, 63, 4, 13, 31, 11, 71, 36, 19]
smallest = 2147483647
biggest = -2147483648
for number in numbers:
    if number < smallest:
        smallest = number
    if number > biggest:
        biggest = number
print (smallest)
print (biggest)
  • modul/archiv/m319python/learningunits/lu05/loesungen/kleingross.txt
  • Zuletzt geändert: 2024/03/28 14:07
  • von 127.0.0.1