I'm trying to make a function that allows you to repeat a given action a set number of times. But no matter what number I put in the "repeat" argument, it only executes "action" once. Here's the code:
def repeat(repeat,action):
for num in range(repeat):
action
repeat(3,print("text"))
Here's a varient of the code that still failed:
def doUntil(condition, action):
while condition != True:
action