Guest User

Untitled

a guest
Oct 24th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. c = [0, 10, 11, 48, 50.5, 0.48, 17, 18, 23, 29, 33, 34.67, 50.1, 0.09, 7, 41, 45, 50]
  2.  
  3. C 1:
  4. Start: (0, 0) # starts at index 0, value 0
  5. End: (4, 50.5) #ends at index 4, value 50.5
  6.  
  7. C 2:
  8. Start: (5, 0.48)
  9. End: (12, 50.1)
  10.  
  11. C 3:
  12. Start: (13, 0.09)
  13. End: (17, 50)
  14.  
  15. min = []
  16. max = []
  17. for i, (first,second) in enumerate(zip(c, c[1:])):
  18. if first < second:
  19. min.append((i,first))
  20. continue
  21. if first > second:
  22. max.append((i,first))
  23. continue
Add Comment
Please, Sign In to add comment