






import os
from distutils.util import strtobool







def 	_UpperCamelCase   (    UpperCamelCase_       :					Any    ,       UpperCamelCase_       :					Optional[Any]		)  ->   str:

						"""simple docstring"""



						for e in env_keys:
												lowerCAmelCase__    						=						int(os.environ.get(UpperCamelCase_    ,       -1		)		)
												if val >= 0:
																		return val
						return default







def 	_UpperCamelCase   (    UpperCamelCase_       :					str    ,       UpperCamelCase_       :					Union[str, Any]=False		)  ->   List[str]:

						"""simple docstring"""



						lowerCAmelCase__    						=						os.environ.get(UpperCamelCase_    ,       str(UpperCamelCase_		)		)
						return strtobool(UpperCamelCase_		) == 1  # As its name indicates `strtobool` actually returns an int...







def 	_UpperCamelCase   (    UpperCamelCase_       :					int    ,       UpperCamelCase_       :					Optional[Any]="no"		)  ->   int:

						"""simple docstring"""



						lowerCAmelCase__    						=						os.environ.get(UpperCamelCase_    ,       str(UpperCamelCase_		)		)
						return value













def 	_UpperCamelCase   (    UpperCamelCase_       :					int		)  ->   int:

						"""simple docstring"""



						if not isinstance(UpperCamelCase_    ,       UpperCamelCase_		):
												raise ValueError('multiplicative_persistence() only accepts integral values'		)
						if num < 0:
												raise ValueError('multiplicative_persistence() does not accept negative values'		)

						lowerCAmelCase__    						=						0
						lowerCAmelCase__    						=						str(UpperCamelCase_		)

						while len(UpperCamelCase_		) != 1:
												lowerCAmelCase__    						=						[int(UpperCamelCase_		) for i in num_string]

												lowerCAmelCase__    						=						1
												for i in range(0    ,       len(UpperCamelCase_		)		):
																		total *= numbers[i]

												lowerCAmelCase__    						=						str(UpperCamelCase_		)

												steps += 1
						return steps







def 	_UpperCamelCase   (    UpperCamelCase_       :					int		)  ->   int:

						"""simple docstring"""



						if not isinstance(UpperCamelCase_    ,       UpperCamelCase_		):
												raise ValueError('additive_persistence() only accepts integral values'		)
						if num < 0:
												raise ValueError('additive_persistence() does not accept negative values'		)

						lowerCAmelCase__    						=						0
						lowerCAmelCase__    						=						str(UpperCamelCase_		)

						while len(UpperCamelCase_		) != 1:
												lowerCAmelCase__    						=						[int(UpperCamelCase_		) for i in num_string]

												lowerCAmelCase__    						=						0
												for i in range(0    ,       len(UpperCamelCase_		)		):
																		total += numbers[i]

												lowerCAmelCase__    						=						str(UpperCamelCase_		)

												steps += 1
						return steps


if __name__ == "__main__":
					import doctest

					doctest.testmod()





