fork download
  1. def salem(s = 'Adam'):
  2. print('Salem, ' + s + '!')
  3. return 17
  4. print(salem()) #main start
  5.  
  6. def f(a, b):
  7. return a * b + 1
  8.  
  9. x = 2
  10. y = 13
  11. print(f(x, y))
  12. a = 4
  13. b = 7
  14.  
  15. def f1(a, b):
  16. return a - b + 1
  17.  
  18. print(f1(a, b))
  19. print(f1(b, a))
  20.  
  21.  
  22. #array ishinen en kop kezdesetin element tabu
  23. def max_elem(arr):
  24. max_count = 0
  25. for x in arr:
  26. if arr.count(x) > max_count:
  27. max_count = arr.count(x)
  28. res = x
  29. return res
  30.  
  31. print(max_elem([2,3,4,2,3,6,7,2,5,8,8,8,8,8,8,8]))
  32.  
  33.  
Success #stdin #stdout 0.07s 13912KB
stdin
Standard input is empty
stdout
Salem, Adam!
17
27
-2
4
8