



def       UpperCamelCase(  __UpperCamelCase							:		str					,__UpperCamelCase							:		str					,__UpperCamelCase							:		int					,__UpperCamelCase							:		int					,__UpperCamelCase							:		int					,__UpperCamelCase							:		int					,):
		lowerCAmelCase_      :					int     =			list(__UpperCamelCase			)
		lowerCAmelCase_      :					str     =			list(__UpperCamelCase			)
		lowerCAmelCase_      :					List[str]     =			len(__UpperCamelCase			)
		lowerCAmelCase_      :					Any     =			len(__UpperCamelCase			)

		lowerCAmelCase_      :					Optional[int]     =			[
		    [0 for _ in range(len_destination_seq + 1			)] for _ in range(len_source_seq + 1			)
		]
		lowerCAmelCase_      :					Any     =			[
		    ['''0''' for _ in range(len_destination_seq + 1			)] for _ in range(len_source_seq + 1			)
		]

		for i in range(1					,len_source_seq + 1			):
				lowerCAmelCase_      :					Optional[int]     =			i * delete_cost
				lowerCAmelCase_      :					Optional[int]     =			f"""D{source_seq[i - 1]:c}"""

		for i in range(1					,len_destination_seq + 1			):
				lowerCAmelCase_      :					Union[str, Any]     =			i * insert_cost
				lowerCAmelCase_      :					Any     =			f"""I{destination_seq[i - 1]:c}"""

		for i in range(1					,len_source_seq + 1			):
				for j in range(1					,len_destination_seq + 1			):
						if source_seq[i - 1] == destination_seq[j - 1]:
								lowerCAmelCase_      :					Union[str, Any]     =			costs[i - 1][j - 1] + copy_cost
								lowerCAmelCase_      :					List[Any]     =			f"""C{source_seq[i - 1]:c}"""
						else:
								lowerCAmelCase_      :					List[Any]     =			costs[i - 1][j - 1] + replace_cost
								lowerCAmelCase_      :					Optional[Any]     =			f"""R{source_seq[i - 1]:c}""" + str(destination_seq[j - 1]			)

						if costs[i - 1][j] + delete_cost < costs[i][j]:
								lowerCAmelCase_      :					Any     =			costs[i - 1][j] + delete_cost
								lowerCAmelCase_      :					Tuple     =			f"""D{source_seq[i - 1]:c}"""

						if costs[i][j - 1] + insert_cost < costs[i][j]:
								lowerCAmelCase_      :					Dict     =			costs[i][j - 1] + insert_cost
								lowerCAmelCase_      :					Optional[Any]     =			f"""I{destination_seq[j - 1]:c}"""

		return costs, ops


def       UpperCamelCase(  __UpperCamelCase							:		list[list[str]]					,__UpperCamelCase							:		int					,__UpperCamelCase							:		int			):
		if i == 0 and j == 0:
				return []
		else:
				if ops[i][j][0] == "C" or ops[i][j][0] == "R":
						lowerCAmelCase_      :					Tuple     =			assemble_transformation(__UpperCamelCase					,i - 1					,j - 1			)
						seq.append(ops[i][j]			)
						return seq
				elif ops[i][j][0] == "D":
						lowerCAmelCase_      :					Any     =			assemble_transformation(__UpperCamelCase					,i - 1					,__UpperCamelCase			)
						seq.append(ops[i][j]			)
						return seq
				else:
						lowerCAmelCase_      :					int     =			assemble_transformation(__UpperCamelCase					,__UpperCamelCase					,j - 1			)
						seq.append(ops[i][j]			)
						return seq


if __name__ == "__main__":
						A__ ,					A__  :  Tuple       = compute_transform_tables('''Python''', '''Algorithms''', -1, 1, 2, 2)

						A__  :  List[Any]       = len(operations)
						A__  :  Optional[Any]       = len(operations[0])
						A__  :  Dict       = assemble_transformation(operations, m - 1, n - 1)

						A__  :  List[Any]       = list('''Python''')
						A__  :  Tuple       = 0
						A__  :  List[str]       = 0

						with open('''min_cost.txt''', '''w''') as file:
												for op in sequence:
																		print(''''''.join(string))

																		if op[0] == "C":
																								file.write('''%-16s''' % '''Copy %c''' % op[1])
																								file.write('''\t\t\t''' + ''''''.join(string))
																								file.write('''\r\n''')

																								cost -= 1
																		elif op[0] == "R":
																								A__  :  int       = op[2]

																								file.write('''%-16s''' % ('''Replace %c''' % op[1] + ''' with ''' + str(op[2])))
																								file.write('''\t\t''' + ''''''.join(string))
																								file.write('''\r\n''')

																								cost += 1
																		elif op[0] == "D":
																								string.pop(i)

																								file.write('''%-16s''' % '''Delete %c''' % op[1])
																								file.write('''\t\t\t''' + ''''''.join(string))
																								file.write('''\r\n''')

																								cost += 2
																		else:
																								string.insert(i, op[1])

																								file.write('''%-16s''' % '''Insert %c''' % op[1])
																								file.write('''\t\t\t''' + ''''''.join(string))
																								file.write('''\r\n''')

																								cost += 2

																		i += 1

												print(''''''.join(string))
												print('''Cost: ''', cost)

												file.write('''\r\nMinimum cost: ''' + str(cost))










from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A__  :  Any       = 9.8_0_6_6_5


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):

		# Ensure valid instance
		if not isinstance(__UpperCamelCase					,(int, float)			):
				raise TypeError('''Invalid velocity. Should be a positive number.'''			)

		if not isinstance(__UpperCamelCase					,(int, float)			):
				raise TypeError('''Invalid angle. Range is 1-90 degrees.'''			)

		# Ensure valid angle
		if angle > 90 or angle < 1:
				raise ValueError('''Invalid angle. Range is 1-90 degrees.'''			)

		# Ensure valid velocity
		if init_velocity < 0:
				raise ValueError('''Invalid velocity. Should be a positive number.'''			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Optional[Any]     =			angle_to_radians(2 * angle			)
		return round(init_velocity**2 * sin(__UpperCamelCase			) / g					,2			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Any     =			angle_to_radians(__UpperCamelCase			)
		return round(init_velocity**2 * sin(__UpperCamelCase			) ** 2 / (2 * g)					,2			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Dict     =			angle_to_radians(__UpperCamelCase			)
		return round(2 * init_velocity * sin(__UpperCamelCase			) / g					,2			)


def       UpperCamelCase(  ):
		lowerCAmelCase_ ,  lowerCAmelCase_      :					Any     =			25, 20
		assert horizontal_distance(__UpperCamelCase					,__UpperCamelCase			) == 4_0.9_7
		assert max_height(__UpperCamelCase					,__UpperCamelCase			) == 3.7_3
		assert total_time(__UpperCamelCase					,__UpperCamelCase			) == 1.7_4


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

						testmod()

						# Get input from user
						A__  :  List[Any]       = float(input('''Initial Velocity: ''').strip())

						# Get input from user
						A__  :  Dict       = float(input('''angle: ''').strip())

						# Print results
						print()
						print('''Results: ''')
						print(F'''Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]''')
						print(F'''Maximum Height: {max_height(init_vel, angle)!s} [m]''')
						print(F'''Total Time: {total_time(init_vel, angle)!s} [s]''')





