It’s only 4 ifs. You could get or make a plugin that runs some text as an expression, but that’s probably overkill. You could use the conditional expression to pack the ifs together to do everything in one event.
Global number a=0
Global text op=""
Global number b=0
Global number result=0
Every 1 seconds
— set a to int(random(100))
— set op to mid("+-*/", int(random(4)), 1)
— set b to int(random(100))
— set result to 0
— set result to (op="+")?a+b:result
— set result to (op="-")?a-b:result
— set result to (op="*")?a*b:result
— set result to (op="/")?a/b:result
— set text to a&op&b&"="&result