Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.

Slides:



Advertisements
Similar presentations
Objective: Dealing with data in C++ Agenda: Notes Essay Help.
Advertisements

Types, Variables and Operators Computer Engineering Department Java Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2013.
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.
CS 1400 Chapter 2 sections 1, 2, 4 – 6, 8,
1 9/8/08CS150 Introduction to Computer Science 1 Data Types Section 2.7 – 2.12 CS 150 Introduction to Computer Science I.
Python November 14, Unit 7. Python Hello world, in class.
Variables, Data Types, & Arithmetic Expressions CSC 1401: Introduction to Programming with Java Lecture 3 Wanda M. Kunkle.
Introduction to Python
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
CS150 Introduction to Computer Science 1
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
Basic Input/Output and Variables Ethan Cerami New York
Variable & Constants. A variable is a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines.
2440: 211 Interactive Web Programming Expressions & Operators.
C Tokens Identifiers Keywords Constants Operators Special symbols.
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.
Data Types Copyright © 2006 Patrick McDermott College of Alameda
General Computer Science for Engineers CISC 106 Lecture 04 Dr. John Cavazos Computer and Information Sciences 09/10/2010.
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Variables and Expressions CMSC 201 Chang (rev )
Primitive Variables.
CSCI 130 Chapter 3. Variables & Names Variable Declarations: –reserve a storage location in memory –identify the name of the variable –identify the type.
 Character set is a set of valid characters that a language can recognise.  A character represents any letter, digit or any other sign  Java uses the.
Code Grammar. Syntax A set of rules that defines the combination of symbols and expressions.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
Variables in Java x = 3;. What is a variable?  A variable is a placeholder in memory used by programmers to store information for a certain amount of.
Chapter 2 Variables.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 9, 2005 Lecture Number: 6.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
ITEC 109 Lecture 7 Operations. Review Variables / Methods Functions Assignments –Purpose? –What provides the data? –What stores the data? –What type of.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Variables and Expressions CMSC 201. Today we start Python! Two ways to use python: You can write a program, as a series of instructions in a file, and.
Ajmer Singh PGT(IP) Programming Fundamentals. Ajmer Singh PGT(IP) Java Character Set Character set is a set of valid characters that a language can recognize.
© A+ Computer Science - A reference variable stores the memory address of an object. Monster fred = new Monster(); Monster sally.
CS Jan 2007 Chapter 2 sections 1, 2, 4 – 6, 8,
1.2 Primitive Data Types and Variables
Introduction ABAP Fields and Variables. Slide 2 Fields (Introduction) In ABAP, fields (or data objects) are named locations in memory Variables store.
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
DATA TYPES, VARIABLES AND CONSTANTS. LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify,
ITM © Port, KazmanVariables - 1 ITM 352 Data types, Variables Class #4.
Sudeshna Sarkar, IIT Kharagpur 1 Programming and Data Structure Sudeshna Sarkar Lecture 3.
© 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.
Introduction to Python Lesson 2a Print and Types.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Chapter 2 Variables.
CMSC201 Computer Science I for Majors Lecture 02 – Intro to Python
Variables Variables are used to store data or information.
Visual Basic Variables
Documentation Need to have documentation in all programs
Introduction to Python Data Types and Variables
Variables, Expressions, and IO
Microsoft Visual Basic 2005 BASICS
Varying very versatile variables
Unit-1 Introduction to Java
Chapter 2 Variables.
Variables, Data Types & Math
Variables Kevin Harville.
Variables, Data Types & Math
C# Revision Cards Data types
Chapter 2 Variables.
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.
C Programming Lecture-3 Keywords, Datatypes, Constants & Variables
More Basics of Python Common types of data we will work with
Variables and Constants
Presentation transcript:

Values, Types, and Variables

Values Data Information Numbers Text Pretty much anything

Types All data values have a type (a kind) int ~ integers (whole numbers) Example: 25 float ~ floating-point numbers (decimal numbers) Example: strings ~ text Example: “hello!!!!!!!1” Another Example: “53153”

Variables A label that acts as a container to store a value Just like math! Variable Name Rules: 1. May contain letters, numbers, and underscore _ 2. Cannot start with a number 3. Must not have any special characters 4. Cannot be a special keyword (if, while, def)