I´m trying to practice Algebra with Python in Week 2 using VS Code to run some of the algorithms.
I can’t get one of them to run:
def one_step_addition(): import random #Display problem a = random.randint(-4, 10) b = random.randint(2, 24) print("x + ", a, " = ", b) ans = float(input("x = ")) answer = b - a #Test input if ans==answer: print("Correct \n") else: print("Try again") print("The correct answer is ", answer, "\n")
I don’t know what perimeter to give one_step_addition() to make it run.
Maybe I’m making a dumb mistake, but why can’t I get it to run in the terminal?