


__snake_case            =   "Alexander Joslin"

import operator as op

from .stack import Stack






def 							_lowercase    (		SCREAMING_SNAKE_CASE_   :		str	):





			"""simple docstring"""




			UpperCamelCase         =					{'''*''': op.mul, '''/''': op.truediv, '''+''': op.add, '''-''': op.sub}

			UpperCamelCase         =					Stack()
			UpperCamelCase         =					Stack()

			for i in equation:
						if i.isdigit():
									# RULE 1
									operand_stack.push(int(__A	)	)
						elif i in operators:
									# RULE 2
									operator_stack.push(__A	)
						elif i == ")":
									# RULE 4
									UpperCamelCase         =					operator_stack.peek()
									operator_stack.pop()
									UpperCamelCase         =					operand_stack.peek()
									operand_stack.pop()
									UpperCamelCase         =					operand_stack.peek()
									operand_stack.pop()

									UpperCamelCase         =					operators[opr](__A       ,  __A	)
									operand_stack.push(__A	)

									 # RULE 5
			return operand_stack.peek()


if __name__ == "__main__":
				__snake_case            =   "(5 + ((4 * 2) * (2 + 3)))"
				# answer = 45
				print(F'''{equation} = {dijkstras_two_stack_algorithm(equation)}''')








def 							_lowercase    (		SCREAMING_SNAKE_CASE_   :		int	):





			"""simple docstring"""




			assert (
			    isinstance(SCREAMING_SNAKE_CASE_       ,  SCREAMING_SNAKE_CASE_	) and number_of_steps > 0
			), f'number_of_steps needs to be positive integer, your input {number_of_steps}'
			if number_of_steps == 1:
						return 1
			UpperCamelCase  ,  UpperCamelCase         =					1, 1
			for _ in range(number_of_steps - 1	):
						UpperCamelCase  ,  UpperCamelCase         =					current + previous, current
			return current


if __name__ == "__main__":
			import doctest

			doctest.testmod()




