



'''simple docstring'''
def A__   (					UpperCAmelCase_							):
						return 1_0 - x * x






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						# Bolzano theory in order to find if there is a root between a and b
						if equation(UpperCAmelCase_							) * equation(UpperCAmelCase_							) >= 0:
												raise ValueError('Wrong space!'							)

						_UpperCamelCase :		Dict			    =       a
						while (b - a) >= 0.01:
												# Find middle point
												_UpperCamelCase :		List[str]			    =       (a + b) / 2
												# Check if middle point is root
												if equation(UpperCAmelCase_							) == 0.0:
																		break
												# Decide the side to repeat the steps
												if equation(UpperCAmelCase_							) * equation(UpperCAmelCase_							) < 0:
																		_UpperCamelCase :		Optional[Any]			    =       c
												else:
																		_UpperCamelCase :		int			    =       c
						return c


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					print(bisection(-2, 5))
					print(bisection(0, 6))







'''simple docstring'''
from datetime import datetime

import requests






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		List[Any]			    =       'https://downloadgram.net/wp-json/wppress/video-downloader/video?url='
						_UpperCamelCase :		Optional[int]			    =       requests.get(base_url + url							).json()[0]['urls'][0]['src']
						return requests.get(UpperCAmelCase_							).content


if __name__ == "__main__":
					snake_case_			:     List[str]  	=  input('Enter Video/IGTV url: ').strip()
					snake_case_			:     str  	=  F"""{datetime.now():%Y-%m-%d_%H:%M:%S}.mp4"""
					with open(file_name, 'wb') as fp:
										fp.write(download_video(url))
					print(F"""Done. Video saved to disk as {file_name}.""")


