Generation

generate functionTue, 29 Nov 2022

generate a formula which has a string parameter, the formula should check that the string is convertable to int

def generate_formula(param_string): return lambda x: int(x) + int(param_string) formula = generate_formula('10') formula(2)

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