
'''simple docstring'''






from __future__ import annotations





def    UpperCAmelCase							(  UpperCAmelCase__							:							Dict       ,							UpperCAmelCase__							:							List[str]):
				print(F'''Vertex\tShortest Distance from vertex {src}''')
				for i, d in enumerate(SCREAMING_SNAKE_CASE_):
								print(F'''{i}\t\t{d}''')





def    UpperCAmelCase							(  UpperCAmelCase__							:							str       ,							UpperCAmelCase__							:							Union[str, Any]       ,							UpperCAmelCase__							:							Any):
				for j in range(SCREAMING_SNAKE_CASE_):
								lowerCamelCase			, lowerCamelCase			, lowerCamelCase					:			int									= (graph[j][k] for k in ['src', 'dst', 'weight'])
								if distance[u] != float('inf') and distance[u] + w < distance[v]:
												return True
				return False





def    UpperCAmelCase							(  UpperCAmelCase__							:							List[str]       ,							UpperCAmelCase__							:							Optional[Any]       ,							UpperCAmelCase__							:							str       ,							UpperCAmelCase__							:							Optional[int]):
				lowerCamelCase					:			int									= [float('inf')] * vertex_count
				lowerCamelCase					:			Optional[Any]									= 0.0

				for _ in range(vertex_count - 1):
								for j in range(SCREAMING_SNAKE_CASE_):
												lowerCamelCase			, lowerCamelCase			, lowerCamelCase					:			Optional[Any]									= (graph[j][k] for k in ['src', 'dst', 'weight'])

												if distance[u] != float('inf') and distance[u] + w < distance[v]:
																lowerCamelCase					:			Dict									= distance[u] + w

				lowerCamelCase					:			List[Any]									= check_negative_cycle(SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_)
				if negative_cycle_exists:
								raise Exception('Negative cycle found')

				return distance


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					A			      =      int(input('Enter number of vertices: ').strip())
					A			      =      int(input('Enter number of edges: ').strip())

					A			      =      [{} for _ in range(E)]

					for i in range(E):
										print('Edge ', i + 1)
										A			      =      (
										    int(x)
										    for x in input('Enter source, destination, weight: ').strip().split(' ')
										)
										A			      =      {"src": src, "dst": dest, "weight": weight}

					A			      =      int(input('\nEnter shortest path source:').strip())
					A			      =      bellman_ford(graph, V, E, source)
					print_distance(shortest_distance, 0)


'''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}""")
