VARIABLESKING OF ALL PROGRAMMING        CONCEPTS
Variables are . . . .IMPORTANT
What are Variables?A variable is a named value that changes  its contents while the program runs.                         ...
Variable Names                  Variables have                unique names that                   make sense    Champagne ...
What can they Hold?                  Variables can hold                      anything!      Champagne        Bucket
Example of Common Use For          Variables in Programs                          Name       Age                          ...
Example of Common Use For       Variables in Programs What’s the name of thecurrent user?                I’m holding      ...
Data types                               Variables have aI’m the type of                   data type Variable that   holds...
Data Types            String           Integer           Double            Float  Champagne Char    Bucket           Boolean
Reusable     The point of   variables is that     they can be    changed and reused throughout    the program
Declaring Variables in VB There are 3 parts to declaring a            variableDim name As String
Declaring Variables in VB Dim is written            All variablesbelow declaring             should be  all variables     ...
Declaring Variables in VB  Associating something to the            variableDim name As Stringname = “dave”           The =...
Using Variables in ProgramsModule Module1   Sub Main()       Dim name As String       name = "Dave"       Console.WriteLin...
Upcoming SlideShare
Loading in …5
×

Variables

521 views
381 views

Published on

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
521
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Variables

  1. 1. VARIABLESKING OF ALL PROGRAMMING CONCEPTS
  2. 2. Variables are . . . .IMPORTANT
  3. 3. What are Variables?A variable is a named value that changes its contents while the program runs. You can think of a variable like a bucket. A bucket those contents canaVariable change
  4. 4. Variable Names Variables have unique names that make sense Champagne Bucket
  5. 5. What can they Hold? Variables can hold anything! Champagne Bucket
  6. 6. Example of Common Use For Variables in Programs Name Age Count Champagne BucketProgrammers make use of Variables when they know something is going to change
  7. 7. Example of Common Use For Variables in Programs What’s the name of thecurrent user? I’m holding the answer to that! Champagne Name Bucket ITS DAVE!
  8. 8. Data types Variables have aI’m the type of data type Variable that holds only Champagne ! Don’t you try and put Lemonade in me! Champagne Bucket
  9. 9. Data Types String Integer Double Float Champagne Char Bucket Boolean
  10. 10. Reusable The point of variables is that they can be changed and reused throughout the program
  11. 11. Declaring Variables in VB There are 3 parts to declaring a variableDim name As String
  12. 12. Declaring Variables in VB Dim is written All variablesbelow declaring should be all variables declared as a data typeDim name As String All variable’s have a name
  13. 13. Declaring Variables in VB Associating something to the variableDim name As Stringname = “dave” The = symbols links name to Dave
  14. 14. Using Variables in ProgramsModule Module1 Sub Main() Dim name As String name = "Dave" Console.WriteLine("hello" & name) Console.ReadLine() End SubEnd Module

×