57.0k views
1 vote
In the following expression, identify variables, values, and operators. Evaluate the result of the expression (assume that the value of the variable X is 1).

Variable(s):
Values(s):
Operator(s):

Result of the expression:

User Tdammers
by
7.0k points

1 Answer

6 votes

Answer:

The assignment statement creates new variables and gives them values:

>>> message = "What's up, Doc?"

>>> n = 17

>>> pi = 3.14159

This example makes three assignments. The first assigns the string "What's up, Doc?" to a new variable named message. The second gives the integer 17 to n, and the third gives the floating-point number 3.14159 to pi.

The assignment operator, =, should not be confused with an equals sign (even though it uses the same character). Assignment operators link a name, on the left hand side of the operator, with a value, on the right hand side. This is why you will get an error if you enter:

Step-by-step explanation:

User Ggirtsou
by
7.1k points