






def       snake_case_						(     lowerCAmelCase_       :						list[list[float]]      ):
							__lowercase      :							list[list[float]]				=     []
							for data in source_data:
														for i, el in enumerate(lowerCAmelCase_      ):
																					if len(lowerCAmelCase_      ) < i + 1:
																												data_lists.append([]      )
																					data_lists[i].append(float(lowerCAmelCase_      )      )
							return data_lists
def       snake_case_						(     lowerCAmelCase_       :						list[list[float]]       ,       lowerCAmelCase_       :						list[int]      ):
							__lowercase      :							list[list[float]]				=     []
							for dlist, weight in zip(lowerCAmelCase_       ,       lowerCAmelCase_      ):
														__lowercase      :							Union[str, Any]				=     min(lowerCAmelCase_      )
														__lowercase      :							List[Any]				=     max(lowerCAmelCase_      )

														__lowercase      :							list[float]				=     []
														# for weight 0 score is 1 - actual score
														if weight == 0:
																					for item in dlist:
																												try:
																																			score.append(1 - ((item - mind) / (maxd - mind))      )
																												except ZeroDivisionError:
																																			score.append(1      )

														elif weight == 1:
																					for item in dlist:
																												try:
																																			score.append((item - mind) / (maxd - mind)      )
																												except ZeroDivisionError:
																																			score.append(0      )

        # weight not 0 or 1
														else:
																					__lowercase      :							int				=     F"Invalid weight of {weight:f} provided"
																					raise ValueError(lowerCAmelCase_      )

														score_lists.append(lowerCAmelCase_      )

							return score_lists
def       snake_case_						(     lowerCAmelCase_       :						list[list[float]]      ):
							__lowercase      :							list[float]				=     [0 for i in range(len(score_lists[0]      )      )]

							for slist in score_lists:
														for j, ele in enumerate(lowerCAmelCase_      ):
																					__lowercase      :							Optional[Any]				=     final_scores[j] + ele

							return final_scores



def       snake_case_						(     lowerCAmelCase_       :						list[list[float]]       ,       lowerCAmelCase_       :						list[int]      ):
							__lowercase      :							str				=     get_data(lowerCAmelCase_      )
							__lowercase      :							Any				=     calculate_each_score(lowerCAmelCase_       ,       lowerCAmelCase_      )
							__lowercase      :							Optional[Any]				=     generate_final_scores(lowerCAmelCase_      )

							# append scores to source data
							for i, ele in enumerate(lowerCAmelCase_      ):
														source_data[i].append(lowerCAmelCase_      )

							return source_data







def       snake_case_		(     lowerCAmelCase_       :						int       ,       lowerCAmelCase_       :						int      ):
							return int((input_a, input_a).count(0      ) == 0      )
def       snake_case_		(     ):
							assert and_gate(0       ,       0      ) == 0
							assert and_gate(0       ,       1      ) == 0
							assert and_gate(1       ,       0      ) == 0
							assert and_gate(1       ,       1      ) == 1


if __name__ == "__main__":
	test_and_gate()
	print(and_gate(1, 0))
	print(and_gate(0, 0))
	print(and_gate(0, 1))
	print(and_gate(1, 1))