
'''simple docstring'''






from math import isclose, sqrt





def    UpperCAmelCase							(  UpperCAmelCase__							:							float       ,							UpperCAmelCase__							:							float       ,							UpperCAmelCase__							:							float):
				lowerCamelCase					:			Union[str, Any]									= point_y / 4 / point_x
				lowerCamelCase					:			List[Any]									= 2 * normal_gradient / (1 + normal_gradient * normal_gradient)
				lowerCamelCase					:			Tuple									= (1 - normal_gradient * normal_gradient) / (
				    1 + normal_gradient * normal_gradient
				)
				lowerCamelCase					:			int									= (sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

				# to find the next point, solve the simultaeneous equations:
				# y^2 + 4x^2 = 100
				# y - b = m * (x - a)
				# ==> A x^2 + B x + C = 0
				lowerCamelCase					:			Union[str, Any]									= outgoing_gradient**2 + 4
				lowerCamelCase					:			str									= 2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
				lowerCamelCase					:			Optional[int]									= (point_y - outgoing_gradient * point_x) ** 2 - 1_00

				lowerCamelCase					:			str									= (
				    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term)
				) / (2 * quadratic_term)
				lowerCamelCase					:			Tuple									= (
				    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term)
				) / (2 * quadratic_term)

				# two solutions, one of which is our input point
				lowerCamelCase					:			Dict									= x_minus if isclose(UpperCAmelCase__       ,							UpperCAmelCase__) else x_plus
				lowerCamelCase					:			List[Any]									= point_y + outgoing_gradient * (next_x - point_x)

				return next_x, next_y, outgoing_gradient





def    UpperCAmelCase							(  UpperCAmelCase__							:							float = 1.4       ,							UpperCAmelCase__							:							float = -9.6):
				lowerCamelCase					:			int									= 0
				lowerCamelCase					:			float									= first_x_coord
				lowerCamelCase					:			float									= first_y_coord
				lowerCamelCase					:			float									= (1_0.1 - point_y) / (0.0 - point_x)

				while not (-0.0_1 <= point_x <= 0.0_1 and point_y > 0):
								lowerCamelCase			, lowerCamelCase			, lowerCamelCase					:			Optional[int]									= next_point(UpperCAmelCase__       ,							UpperCAmelCase__       ,							UpperCAmelCase__)
								num_reflections += 1

				return num_reflections


if __name__ == "__main__":
					print(f"""{solution() = }""")


'''simple docstring'''






import requests
from bsa import BeautifulSoup





def    UpperCAmelCase							(  UpperCAmelCase__							:							str = "AAPL"):
				lowerCamelCase					:			List[Any]									= F'''https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'''
				lowerCamelCase					:			Dict									= BeautifulSoup(requests.get(UpperCAmelCase__).text       ,							'html.parser')
				lowerCamelCase					:			Dict									= 'My(6px) Pos(r) smartphone_Mt(6px)'
				return soup.find('div'       ,							class_=class_).find('span').text


if __name__ == "__main__":
					for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
										print(f"""Current {symbol:<4} stock price is {stock_price(symbol):>8}""")
