asked 189k views
5 votes
Can a computer evaluate an expression to something between true and false? *Can you write an expression to deal with a "maybe" answer?*​

2 Answers

2 votes

Answer:

Yes a computer can evaluate expressions to something between true and false. They can also answer "maybe" depending on the variables and code put in.

Step-by-step explanation:

answered
User PuercoPop
by
8.7k points
2 votes
A computer cannot evaluate an expression to be between true or false.
Expressions in computers are usually boolean expressions; i.e. they can only take one of two values (either true or false, yes or no, 1 or 0, etc.)
Take for instance, the following expressions:

1 +2 = 3
5 > 4
4 + 4 < 10

The above expressions will be evaluated to true, because the expressions are correct, and they represent true values.
Take for instance, another set of expressions

1 + 2 > 3
5 = 4
4 + 4 > 10

The above expressions will be evaluated to false, because the expressions are incorrect, and they represent false values.
Aside these two values (true or false), a computer cannot evaluate expressions to other values (e.g. maybe)
answered
User Thevikasdube
by
8.1k points

No related questions found