



"""simple docstring"""





import math
def 						__lowerCAmelCase    (		__UpperCamelCase   :      float       ,			__UpperCamelCase   :      float     ):


						'''simple docstring'''






						if initial_intensity < 0:
												raise ValueError("""The value of intensity cannot be negative"""     )
												# handling of negative values of initial intensity
						if angle < 0 or angle > 3_6_0:
												raise ValueError("""In Malus Law, the angle is in the range 0-360 degrees"""     )
												# handling of values out of allowed range
						return initial_intensity * (math.cos(math.radians(__UpperCamelCase     )     ) ** 2)


if __name__ == "__main__":
					import doctest

					doctest.testmod(name='''malus_law''')








UpperCAmelCase_							=				8.31_44_62  # Unit - J mol-1 K-1





def  __magic_name__  (				lowercase				,       lowercase				,       lowercase				)				-> float:

							"""simple docstring"""



							if moles < 0 or kelvin < 0 or volume < 0:
														raise ValueError("""Invalid inputs. Enter positive value."""				)
							return moles * kelvin * UNIVERSAL_GAS_CONSTANT / volume





def  __magic_name__  (				lowercase				,       lowercase				,       lowercase				)				-> float:

							"""simple docstring"""



							if moles < 0 or kelvin < 0 or pressure < 0:
														raise ValueError("""Invalid inputs. Enter positive value."""				)
							return moles * kelvin * UNIVERSAL_GAS_CONSTANT / pressure


if __name__ == "__main__":
							from doctest import testmod

							testmod()