Variable is the name of a memory
location which stores some data.
Memory
a b
, Variables
Rules
a. Variables are case sensitive
b. 1st character is alphabet or '_'
c. no comma/blank space
d. No other symbol other than '_'
Variables and data types are foundational concepts in programming. Variables A variable is a symbolic name for a storage location in a program. This storage location holds a value that can be changed or used throughout the program. Think of a variable as a "container" for storing data. Variables allow programs to process and manipulate data dynamically. Example: age = 25 name = "Alice" In the example, age and name are variables. The values 25 and "Alice" are stored in these variables, respectively. Data Types Data types specify the type of data that a variable can hold. Different programming languages have various data types, but some common ones include: 1. Integer (int): Whole numbers (e.g., 10, -5, 42) 2. Float (float): Numbers with a decimal point (e.g., 3.14, -0.99) 3. String (str): Text or sequences of characters (e.g., "Hello", "123abc") 4. Boolean (bool): Logical values True or `False
Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.
Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.
Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.
“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”