A conditional expression means 'do something only if certain conditions are met'. For example, consider this short BASIC program...
10 a=0
20 b=a+1
30 PRINT b
40 GOTO 20
Will produce every number unless the break key is pressed. However, changing line 30 to a conditional expression, as in this program...
10 a=0
20 b=a+1
30 IF b/10=INT (b/10) THEN PRINT b
40 GOTO 20
Would only display a value every time the condition in line 30 is met. It still adds 1 to b every time it loops round, but would display only the numbers that divide exactly by 10.
Chat with our AI personalities
no
It is a formula with an equal sign * * * * * No. Each side of the equal sign is an expression but the whole is an equation. An expression is a combination of numbers and operators without an equality (or inequality) sign. [Actually, such signs may appear in conditional values, but that is getting seriously pedantic!]
Switching the hypothesis and conclusion of a conditional statement.
Replace each variable in the expression by its value and then find the value of the expression.
more