Maszi

Zadanie klasyczne 1 str 40

Dec 15th, 2019
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input("Podaj wielkość tablicy: "))
  2. tablica = [0]*n
  3. i = 0
  4.  
  5. while i<n:
  6.     tablica[i] = int(input("Podaj liczbę: "))
  7.     i+=1
  8. print(tablica)
  9.  
  10. tablica.sort()
  11. max = tablica[-1]
  12. max2 = tablica[-2]
  13.  
  14. print(tablica)
  15. print("Największa liczba to: " + str(max) + "\nDruga największa liczba to: " + str(max2))
RAW Paste Data