Advertisement
SviderskiVadim

HomeWork_task1_hard

Dec 10th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. def func_one(list_param):
  2.     i=0
  3.     j=0
  4.     max_leng=0
  5.     new_lst=[]
  6.     for i in range(i, len(list_param), 1):
  7.         for i in range(i, len(list_param), 1):
  8.             if len(new_lst)==0 :
  9.                 new_lst.append(list_param[i])
  10.             elif new_lst[-1]<float(list_param[i] or 0):
  11.                  new_lst.append(list_param[i])
  12.             if max_leng<len(new_lst):
  13.                 max_leng=len(new_lst)
  14.     new_lst.clear()
  15.     return max_leng
  16.  
  17.  
  18. lst = [0, 2, 1, 6, 8, 3, 14, 5]
  19. lst_2=[88, 90, 77, 55, 6, 42, 9, 8, 88, 18, 33, 36, 23, 81, 30, 54.2, 37, 46, 34, 20, 22, 54, 87, 73, 17, 52, 57, 61, 55, 5, 61, 51, 53, 20, 5, 29, 13, 42, 35, 15, '15.2', 60, 32, 81, 63, 49, 73, 77, 23, 91, 1, 48, 33, 35, 70, 7, 10, 33, 3, 7, 46, 66, 16, 4, 60, 65, 43, 28, 35, 26, 84, 84, 88, 48, 63, 6, 61, 15, 70, 57, 64, 77, None, 33, 30, 24, 65, 55, 100, 22, 47, 44, 64, 94, 76, 19, 74, 85, 37, 41, 95, 18]
  20. print(func_one(lst))
  21. print(func_one(lst_2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement