Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(pict,k):
- # @param pict: picture
- # @param k: int
- # @return: bool
- S= 0
- y = 0
- while y <= (getHeight(pict)-1):
- for x in range(getWidth(pict)):
- R= getRed(getPixel(pict,x,y))
- S= S + R
- if S == k :
- return True
- else :
- y= y+1
- S= 0
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement