Sebastián

Generation

generate functionThu, 13 Jul 2023

Crear Una Calculadora

def calc(a, b, operator): if operator == '+': return a + b elif operator == '-': return a - b elif operator == '*': return a * b elif operator == '/': return a / b print(calc(2, 3, '+')) print(calc(2, 3, '-')) print(calc(2, 3, '*')) print(calc(6, 3, '/'))

Want to kickstart your project?Use the new AI Studio to create your code