




'''simple docstring'''



def 			_UpperCamelCase (_lowerCamelCase							:     list   ,	_lowerCamelCase							:     int	)->   int:




     '''simple docstring'''





     for index, item in enumerate(_lowerCamelCase	):
          if item == target:
               return index
     return -1







def 			_UpperCamelCase (_lowerCamelCase							:     list   ,	_lowerCamelCase							:     int   ,	_lowerCamelCase							:     int   ,	_lowerCamelCase							:     int	)->   int:




     '''simple docstring'''





     if not (0 <= high < len(_lowerCamelCase	) and 0 <= low < len(_lowerCamelCase	)):
          raise Exception('''Invalid upper or lower bound!'''	)
     if high < low:
          return -1
     if sequence[low] == target:
          return low
     if sequence[high] == target:
          return high
     return rec_linear_search(_lowerCamelCase   ,	low + 1   ,	high - 1   ,	_lowerCamelCase	)


if __name__ == "__main__":
     UpperCAmelCase_       :  int      =		input('''Enter numbers separated by comma:\n''').strip()
     UpperCAmelCase_       :  List[Any]      =		[int(item.strip()) for item in user_input.split(''',''')]

     UpperCAmelCase_       :  Any      =		int(input('''Enter a single number to be found in the list:\n''').strip())
     UpperCAmelCase_       :  List[Any]      =		linear_search(sequence, target)
     if result != -1:
          print(F"""linear_search({sequence}, {target}) = {result}""")
     else:
          print(F"""{target} was not found in {sequence}""")












'''simple docstring'''



from datetime import date

import requests

UpperCAmelCase_       :  str      =		'''https://api.carbonintensity.org.uk/intensity'''







def 			_UpperCamelCase ()->   str:




     '''simple docstring'''





     __snake_case    					=  requests.get(_lowerCamelCase	).json()['''data'''][0]
     return last_half_hour["intensity"]["actual"]







def 			_UpperCamelCase (_lowerCamelCase							:     Dict   ,	_lowerCamelCase							:     List[Any]	)->   list:




     '''simple docstring'''





     return requests.get(f'''{BASE_URL}/{start}/{end}'''	).json()["data"]


if __name__ == "__main__":
     for entry in fetch_from_to(start=date(2_0_2_0, 1_0, 1), end=date(2_0_2_0, 1_0, 3)):
          print('''from {from} to {to}: {intensity[actual]}'''.format(**entry))
     print(F"""{fetch_last_half_hour() = }""")






