returns the expression corresponding to the first parenthetical that evaluates to true when coerced to a boolean, or the else case if none of them evaluate to true, assuming that the else case is present, otherwise returning void


"if" {IC} %condition(PARENTHETICAL) {IC} %invoke(EXPRESSION) {{IC} "elif" {IC} %condition(PARENTHETICAL) {IC} %invoke(EXPRESSION)} [ {IC} "else" {IC} %else_invoke(EXPRESSION) ]


if (input("What is 1 + 1 ? ") = "2") {
    print("You are correct!");
} else {
    print("Sorry, you are incorrect.");

This website does not use cookies or javascript, excluding the Google search bar.
copyright © Brent Lewis 2013-2017