Variables and Types
Variables and Types When we create a program, we often like to store values so that it can be used later. We use objects to capture data, which then can be manipulated by computer to provide information. By now we know that object/ variable is a name which refers to a value. Every object has: An Identity - can be known using id (object) A type – can be checked using type (object) and A value – any value Identity of the object: It is the object's address in memory and does not change once it has been created. Type (i.e data type): It is a set of values, and the allowable operations on those values. It can be one of the following: 1. Number Number data type stores...