Robotics & Artificial Intelligence
Write short notes on Assignment.
Python Funda
3 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
2 Likes
Related Questions
In Python programming, it is an unordered collection data type that is iterable, mutable and has no duplicate elements. It is represented by { } where the values are enclosed in curly braces.
Read the above paragraph and answer the following questions:
(a) Name the data type that is used in Python.
(b) What will happen, if duplicate elements are present in this data types and executed?
Write short notes on Indentation.
Write short notes on Boolean Constant.
Write short notes on Variable.