KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write short notes on Assignment.

Python Funda

2 Likes

Answer

Assignment means to store values in variables using a token '='. Here, the symbol '=' acts as an assignment operator. The 'equal to' sign (=) is used to assign values to the variables. The operand to the left of the '=' operator is the variable name and the operand to the right of the '=' operator is the value to be stored.

Syntax: <variable> = <value>

For example:

  • m = 15 : 15 is stored in the variable m which is of integer type.
  • n = 45.24 : 45.24 is stored in the variable n which is of float type.
  • ch = 'k' : The letter 'k' is stored as a string character in variable ch.
  • wd = "Computer Science" : A word is stored in the variable wd.

Answered By

1 Like


Related Questions