DATA TYPES, VARIABLES AND CONSTANTS. LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify,

Slides:



Advertisements
Similar presentations
Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica 1 Problem Solving Section 2:
Advertisements

Ch. 3 Variables VB.Net Programming. Data Types Boolean – True or False values Short – Small integers (+/- 32,767) Integer – Medium-size integers (+/-
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Chapter 3 DATA: TYPES, CLASSES, AND OBJECTS. Chapter 3 Data Abstraction Abstract data types allow you to work with data without concern for how the data.
Objective: Dealing with data in C++ Agenda: Notes Essay Help.
Chapter 2 Review Questions
VARIABLES: Your Own Piece of the ram. Why Use Variables? To save a piece of data in memory To save a piece of data in memory To store results of a calculation.
EGR 141 Computer Problem Solving in Engineering and Computer Science
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
Identifiers and Assignment Statements. Data structures In any programming language you need to refer to data The simplest way is with the actual data.
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
Java Data Types. Primitive Data Types Java has 8 primitive data types: – char: used to store a single character eg. G – boolean: used to store true or.
Logical or Boolean Data stored in Boolean form can only be one of two available values. Think of a light switch – it’s on or off. Examples include: YES.
Multiplying decimals. What is the answer to 0.26 x 0.6? In order to work this out you must be able to multiply the whole numbers together In fact do just.
3 - Variables Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Selection Boolean What is Boolean ? Boolean is a set with only two values : –true –false true and false are standard identifiers in Pascal, called Boolean.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Variables Damian Gordon. Variables We know what a variable is from maths. We’ve all seen this sort of thing in algebra: 2x – 10 = 0 2x = 10 X = 5.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
1 homework Due today: hw #1 (mailing list printout) readings to date: chapter 1 and chapter read appendix B (3 pages on DOS) and and.
INT213-Week-2 Working with Variables. What is variable
Other Variable Types Dim lab as String makes a box that can store a label tag Dim ColHead As String ColHead = “function” ColHead function Dim lab as Boolean.
ITEC 109 Lecture 7 Operations. Review Variables / Methods Functions Assignments –Purpose? –What provides the data? –What stores the data? –What type of.
Data Tonga Institute of Higher Education. Variables Programs need to remember values.  Example: A program that keeps track of sales needs to remember.
Chapter 6 Looping Structures. Do…LoopDo…Loop Statement Can operate statements repetitively Do intx=intx + 1 Loop While intx < 10 –The Loop While operates.
Programming with Microsoft Visual Basic th Edition
Variables Hold information that may be manipulated, used to manipulate other information or remembered for later use A storage location in memory (RAM)
Variables in VB.NET. Variables  A storage location in memory (RAM)  Holds data/information while the program is running  These storage locations can.
Variables Continued In the last session we saw how variables are objects that allow us to store values in the RAM of the computer In this session we shall.
Murach, Chapter 4. Two Data Types Value Types – Store their own data Reference Types Do not store their own data Stores a reference to an area of memory.
A: A: double “4” A: “34” 4.
Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.
More than just a song and dance.. They are objects that store primitive variable values: Integer – stores an int Double – stores a double Character –
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Variables in VB. What is a variable? ► A named memory location that stores a value.
Creation of Variables with Numeric, alphanumeric, date, picture, memo data types Constant - A quantity that does not change during the execution of a program.
Chapter 4: Variables, Constants, and Arithmetic Operators Introduction to Programming with C++ Fourth Edition.
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
A variable is a name for a value stored in memory.
Variables Variables are used to store data or information.
Data Types, Arithmetic Operations
JavaScript Objects.
Variables Data Types and Assignment
Unit 2 Smarter Programming.
Learning Objective LO: We’re learning to understand when it is appropriate to use particular data types.
Review Operation Bingo
البرمجة بلغة فيجول بيسك ستوديو
Numbers.
Variables Numbers can be stored and retrieved while a program is running if they are given a home. The way that integers and decimal numbers are stored.
Java Lessons 5 – 8 Mr. Kalmes.
Variables Kevin Harville.
CHAPTER FOUR VARIABLES AND CONSTANTS
The Data Element.
Variables Data Types and Assignment
Variables Here we go.
C# Revision Cards Data types
Java: Variables, Input and Arrays
The Data Element.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Data Types and Maths Programming Guides.
GCSE Computing:: Selection (IF statements)
Variables Data Types and Assignment
Variables and Constants
Primitive Data Types and Operators
Presentation transcript:

DATA TYPES, VARIABLES AND CONSTANTS

LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify, explain and apply constants and variables  Be able to identify and know how to apply different data types

WHAT IS DATA?  Data is facts and statistics collected together

WHAT IS INFORMATION?  Information is data, with a rule applied to it

THE DIFFERENCE  Data is the raw version of information. Data is information without any rules applied to it, to give context

VARIABLE  A variable is a programming concept that stores information, so it can be called upon later on in the program.  Dim ___ As ____?

DATA TYPES  Integer / (Number)  String / (Word)  Boolean / (True or False)  Double / (Number with Decimal)  Date / (A Date)  Character / (Letter)

WHAT DATA TYPES WOULD THESE BE?  Dim name As String  Dim moneyEarnt As Double  Dim gradeA_F As Character  Dim goalsScored As Integer  Dim canVote As Boolean