Advertisement
programusy

Untitled

Nov 2nd, 2023
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import random
  2.  
  3. tablica = [[random.randint(10,99) for x in range(10)] for x in range(10)]
  4.  
  5. kolumna = int(input("Wybierz kolumne od 1 do 10: "))
  6.  
  7. def minimum(kol):
  8. return min(row[kol - 1] for row in tablica)
  9.  
  10. def maximum(kol):
  11. return max(row[kol - 1] for row in tablica)
  12.  
  13. def generuj():
  14. for row in tablica:
  15. print(*row)
  16.  
  17. generuj()
  18. print(f"Wartość minimalna: {minimum(kolumna)}")
  19. print(f"Wartość maksymalna: {maximum(kolumna)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement