





"""simple docstring"""




from math import factorial, radians






def  _SCREAMING_SNAKE_CASE						(      _lowercase		:       float       ,			_lowercase		:       int = 18       ,			_lowercase		:       int = 10   )					->float:






	'''simple docstring'''






	a :						Optional[Any]      =							angle_in_degrees - ((angle_in_degrees // 360.0) * 360.0)

	# Converting from degrees to radians
	a :						Any      =							radians(_lowercase   )

	a :						Optional[int]      =							angle_in_radians
	a :						Dict      =							3
	a :						Dict      =							-1

	for _ in range(_lowercase   ):
		result += (b * (angle_in_radians**a)) / factorial(_lowercase   )

		a :						List[str]      =							-b  # One positive term and the next will be negative and so on...
		a += 2  # Increased by 2 for every term.

	return round(_lowercase       ,			_lowercase   )


if __name__ == "__main__":
		__import__('''doctest''').testmod()









"""simple docstring"""




class 			__UpperCamelCase							:  # Public class to implement a graph






							def __init__(  self ,   lowerCAmelCase__ ,   lowerCAmelCase__ ,   lowerCAmelCase__ )      ->					None:
								a :						int      =							row
								a :						Tuple      =							col
								a :						Optional[int]      =							graph






							def        __a  (  self ,   lowerCAmelCase__ ,   lowerCAmelCase__ ,   lowerCAmelCase__ )      ->					bool:
								return (
								    0 <= i < self.ROW
								    and 0 <= j < self.COL
								    and not visited[i][j]
								    and self.graph[i][j]
								)






							def        __a  (  self ,   lowerCAmelCase__ ,   lowerCAmelCase__ ,   lowerCAmelCase__ )      ->					None:
								# Checking all 8 elements surrounding nth element
								a :						Optional[Any]      =							[-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
								a :						str      =							[-1, 0, 1, -1, 1, -1, 0, 1]
								a :						str      =							True  # Make those cells visited
								for k in range(8 ):
									if self.is_safe(i + row_nbr[k] ,   j + col_nbr[k] ,   lowerCAmelCase__ ):
										self.diffs(i + row_nbr[k] ,   j + col_nbr[k] ,   lowerCAmelCase__ )






							def        __a  (  self )      ->					int:  # And finally, count all islands.
								a :						Union[str, Any]      =							[[False for j in range(self.COL )] for i in range(self.ROW )]
								a :						Dict      =							0
								for i in range(self.ROW ):
									for j in range(self.COL ):
										if visited[i][j] is False and self.graph[i][j] == 1:
											self.diffs(lowerCAmelCase__ ,   lowerCAmelCase__ ,   lowerCAmelCase__ )
											count += 1
								return count


