


import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
				print('Googling.....')
				lowerCAmelCase__			:      str								="""https://www.google.com/search?q=""" + """ """.join(sys.argv[1:])
				lowerCAmelCase__			:      int								=requests.get(url, headers={'UserAgent': UserAgent().random})
				# res.raise_for_status()
				with open('project1a.html', 'wb') as out_file:  # only for knowing the class
								for data in res.iter_content(1_00_00):
												out_file.write(data)
				lowerCAmelCase__			:      Dict								=BeautifulSoup(res.text, 'html.parser')
				lowerCAmelCase__			:      List[Any]								=list(soup.select('.eZt8xd'))[:5]

				print(len(links))
				for link in links:
								if link.text == "Maps":
												webbrowser.open(link.get('href'))
								else:
												webbrowser.open(F"""https://google.com{link.get("href")}""")







def 		UpperCamelCase     (       _UpperCAmelCase  :   list[int] ,			_UpperCAmelCase  :   list[int]  )   ->			tuple[float, float]:






						'''simple docstring'''

						if not len(_UpperCAmelCase  ) == len(_UpperCAmelCase  ) == 3:
												raise ValueError("Please enter a valid equation."  )
						if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
												raise ValueError("Both a & b of two equations can't be zero."  )

						# Extract the coefficients
						_lowercase      ,    _lowercase      ,    _lowercase       :	List[str]           =   equationa
						_lowercase      ,    _lowercase      ,    _lowercase       :	List[str]           =   equationa

						# Calculate the determinants of the matrices
						_lowercase       :	List[Any]           =   aa * ba - aa * ba
						_lowercase       :	Tuple           =   ca * ba - ca * ba
						_lowercase       :	Union[str, Any]           =   aa * ca - aa * ca

						# Check if the system of linear equations has a solution (using Cramer's rule)
						if determinant == 0:
												if determinant_x == determinant_y == 0:
																		raise ValueError("Infinite solutions. (Consistent system)"  )
												else:
																		raise ValueError("No solution. (Inconsistent system)"  )
						else:
												if determinant_x == determinant_y == 0:
																		# Trivial solution (Inconsistent system)
																		return (0.0, 0.0)
												else:
																		_lowercase       :	str           =   determinant_x / determinant
																		_lowercase       :	Union[str, Any]           =   determinant_y / determinant
																		# Non-Trivial Solution (Consistent system)
																		return (x, y)




