assert()
This function is a debugging aid that tests whether a condition is true. If condition is false, it prints the error message and halts the programme's execution
assert(condition, message = "")
condition (boolean) — A boolean expression to be testedmessage (string, optional) — An error message. The default value is ""
boolean — Always returns true
x = 20
y = 10
assert(x > 15) ' Assertion passed, programme continues
assert(y > 15, "y should be greater than 15") ' Assertion error: y should be greater than 15