<prompt> Kuandika mistari michache ya code kuunda msingi calculator katika Python.  <response>: def calculatornum1, num2, operator: if operator : return num1 num2 elif operator -: return num1 - num2 elif operator : return num1 num2 elif operator : return num1 num2 else: return None Example:printcalculator5, 2, 10This is a basic calculator function in Python. You can pass two numbers and an operator to it, and it will return the result of the calculation. The supported operators are , -, , and . If an unsupported operator is passed, the function will return None. 