ICT Programming Lesson 4:

Slides:



Advertisements
Similar presentations
This is Java Jeopardy.
Advertisements

Introducing JavaScript
Games and Simulations O-O Programming in Java The Walker School
Primitive Data Types There are a number of common objects we encounter and are treated specially by almost any programming language These are called basic.
Introduction to Programming with Java, for Beginners Primitive Types Expressions Statements Variables Strings.
1 *Copyright © 2002 Pearson Education, Inc.. 2 Web Wizard’s Guide to CGI/Perl David Lash Chapter 3 Perl Basics.
1 Lecture-4 Chapter 2 C++ Syntax and Semantics, and the Program Development Process Dale/Weems/Headington.
Announcements Quiz 1 Next Week. int : Integer Range of Typically -32,768 to 32,767 (machine and compiler dependent) float : Real Number (i.e., integer.
10 November JavaScript. Presentation Hints What do YOU think makes a good presentation Some of my suggestions Don’t write full sentences on slides Talk,
Variables, Data Types, & Arithmetic Expressions CSC 1401: Introduction to Programming with Java Lecture 3 Wanda M. Kunkle.
1 CS 105 Lecture 3 Constants & Expressions Wed, Jan 26, 2011, 4:15 pm.
Primitive Types Java supports two kinds of types of values – objects, and – values of primitive data types variables store – either references to objects.
JavaScript, Third Edition
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
String Escape Sequences
Introduction to C++ Programming
Section 2 - More Basics. The char Data Type Data type of a single character Example char letter; letter = 'C';
2440: 211 Interactive Web Programming Expressions & Operators.
Chapter 4 JavaScript and Dynamic Web pages. Objectives Static Web pages Dynamic Web pages JavaScript Variables Assignments. JavaScript Functions –(prompt(“”,””)
Input, Output, and Processing
3 - Variables Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Chapter 2. C++ Program Structure C++ program is a collection of subprograms Subprograms in C++ are called FUNCTIONS Each function performs a specific.
Arithmetic Operations. Review function statement input/output comment #include data type variable identifier constant declaration.
1 INTRODUCTION TO PROBLEM SOLVING AND PROGRAMMING.
1 st Semester Module2 Basic C# Concept อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering.
Introduction to Programming with RAPTOR
Programming Fundamental Slides1 Data Types, Identifiers, and Expressions Topics to cover here: Data types Variables and Identifiers Arithmetic and Logical.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
1 Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Arrays and Strings. Why? Consider a class of 30 students, each has a score for hw1  Do we want to have 30 variables with different names?  Would it.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Variables and Assignment CSIS 1595: Fundamentals of Programming and Problem Solving 1.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Visual Basic CDA College Limassol Campus COM123 Visual Basic Programming Semester C Lecture:Pelekanou Olga Week 4: Understand and implement Decisions.
Chapter Two Fundamental Programming Structures in Java Adapted from MIT-AITI slides Variables and Primitive Data Types 1.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Chapter 4: Variables, Constants, and Arithmetic Operators Introduction to Programming with C++ Fourth Edition.
Sudeshna Sarkar, IIT Kharagpur 1 Programming and Data Structure Sudeshna Sarkar Lecture 3.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Creating Functions This presentation was prepared by Professor Steve Ross, with the advice of other MIS Faculty, for use in MIS Classes at Western Washington.
Chapter Four Common facilities of procedural languages.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
7 - Programming 7J, K, L, M, N, O – Handling Data.
JUST BASIC Lessons 6 – 9 Mr. Kalmes.
Topics Designing a Program Input, Processing, and Output
PowerPoint Presentation Authors of Exposure Java
Chapter 3: Variables, Functions, Math, and Strings
Chapter 3: Variables, Functions, Math, and Strings
Overview: Programming Concepts
Data Types, Identifiers, and Expressions
Variables, Expressions, and IO
JavaScript.
Data Types, Identifiers, and Expressions
Introduction to C++ Programming
Chapter 2 Edited by JJ Shepherd
L1-6 Notes: Algebra: Variables and Expressions
Building Java Programs
Introduction to Java, and DrJava
ICT Gaming Lesson 3.
Topics Designing a Program Input, Processing, and Output
ICT Programming Lesson 5:
The Data Element.
Topics Designing a Program Input, Processing, and Output
Tutorial 10: Programming with javascript
Introduction to Java, and DrJava part 1
The Data Element.
Understanding Variables
Programming Basics Review
Presentation transcript:

ICT Programming Lesson 4: Working with Data

Objectives 4.4.1: Explain the types and uses of variables in programming. 4.4.2: Explain basic object-oriented concepts. 4.4.3: Describe fundamental Boolean concepts, including Boolean algebra, operators, logic. 4.4.4: Create animated objects using a high-level programming environment (e.g., Alice, Greenfoot) to control their behavior. 4.4.5: Create a simple program that uses animated objects. 4.4.8: Troubleshoot and debug errors in code.

Variables Used to store data in the computer’s memory Assigned descriptive names that identify the data Typically a “field” of data Example: X+Y = 7 FirstName = Tom LastName = Johansson Must start with a letter, number or _ Can not contain special characters: $, &, @, # Case sensitive FirstName not equal firstname Order is important Tom=FirstName, what kind of error is this? Syntax

Declaring / Initializing Variables Declare: The part of the code that identifies the variable and the data type Initializing: Giving a variable a beginning value Example: Score = 0

Data Types List games on board. Try to organize as students provide input. You will be categorizing them in a few minutes

Expressions A combination of symbols that contains at least 1 operand (values) and 1 or more operators "Hello" + "World" evaluates to "HelloWorld." Consider the expression fullName = firstName + " " + lastName (the space enclosed in quotes is used to add a space between the two strings when joined). If firstName = "John" and lastName = "Smith" then the expression evaluates to fullName = "John Smith"

Arithmetic Operators Perform math List games on board. Try to organize as students provide input. You will be categorizing them in a few minutes

Comparison Operators Compare variables List games on board. Try to organize as students provide input. You will be categorizing them in a few minutes

Logical Operators Boolean – tell what to do “if” List games on board. Try to organize as students provide input. You will be categorizing them in a few minutes