Chapter Four Common facilities of procedural languages.

Slides:



Advertisements
Similar presentations
Programming Patterns CSC 161: The Art of Programming Prof. Henry Kautz 9/30/2009.
Advertisements

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.
STRINGS IN PYTHON. Where have we seen strings before? #string type variables s = “hello” #obtaining keyboard input from the user choice = input(“Please.
JavaScript- Processing HTML Forms. Event Handlers Begins with and ends with.
 Basically, a sequence of characters  Character? › Like… a letter › Or a number › Or even blank space.
Week 2: Primitive Data Types 1.  Programming in Java  Everything goes inside a class  The main() method is the starting point for executing instructions.
Python November 14, Unit 7. Python Hello world, in class.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
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:
Storing data Getting data out Data types Ruby as a foundation Program Variables Click icon to hear comments (the download may take a minute)
Variables and Functions Chapter Variables Named storage location in computer’s memory Programs may need to store data when running o Stored in.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Microsoft Visual Basic 2008: Reloaded Fourth Edition
A Level Computing#BristolMet Session ObjectivesU2#S10 MUST describe the difference between constants, local and global variables SHOULD explain why constants.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Section 2 Variables National 4/5 Scratch Course. What you should know after this lesson What a variable is Where variables are stored How to get data.
Chapter 3: Data Types and Operators JavaScript - Introductory.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
Manipulating Text In today’s lesson we will look at: why we might want to pick out parts of text strings some BASIC functions that can be used to chop.
I Power Int 2 Computing Software Development High Level Language Constructs.
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
Guide to Oracle 10g ITBIS373 Database Development Lecture 4a - Chapter 4: Using SQL Queries to Insert, Update, Delete, and View Data.
Higher Grade Computing Studies 3. High Level Language Constructs Higher Computing Software Development S. McCrossan 1 Simple Data Types Integer: An integer.
Class 3 Remote Instruction Computer Math EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is.
ICAPRG301A Week 2 Strings and things Charles Babbage Developed the design for the first computer which he called a difference engine, though.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
I Power Higher Computing Software Development High Level Language Constructs.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
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.
Data Tonga Institute of Higher Education. Variables Programs need to remember values.  Example: A program that keeps track of sales needs to remember.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
C++ for Everyone by Cay Horstmann Copyright © 2012 by John Wiley & Sons. All rights reserved Chapter Two: Fundamental Data Types Slides by Evan Gallagher.
Programming with Microsoft Visual Basic th Edition
PHP-language Variables, assingment and arithmetic operations Teppo Räisänen Principal Lecturer Oulu University of Applied Sciences School of Business and.
CSM-Java Programming-I Spring,2005 Fundamental Data Types Lesson - 2.
Higher Computing Software Development -So Far- 5/10/10.
Variables and Strings. Variables  When we are writing programs, we will frequently have to remember a value for later use  We will want to give this.
Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.
Chapter 14 JavaScript: Part II The Web Warrior Guide to Web Design Technologies.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
1 CSE 2337 Chapter 7 Organizing Data. 2 Overview Import unstructured data Concatenation Parse Create Excel Lists.
Chapter 2: Data and Expressions. Variable Declaration In Java when you declare a variable, you must also declare the type of information it will hold.
Operators Chapter 4 - Lecture Slides Math, Conditional operators, conversions They aren’t all just objects to me, some of them are primitive.
Introduction to Python Lesson 2a Print and Types.
Input, Output and Variables GCSE Computer Science – Python.
1 Chapter 8 – Character Arrays and Strings Outline 8.1Introduction 8.2Declaring and Initializing String 8.3Input/output of strings 8.4String-handling Functions.
JUST BASIC Lessons 6 – 9 Mr. Kalmes.
String Methods Programming Guides.
Expressions.
Chapter 3: Variables, Functions, Math, and Strings
Chapter 3: Variables, Functions, Math, and Strings
Operators Operators are symbols such as + (addition), - (subtraction), and * (multiplication). Operators do something with values. $foo = 25; $foo – 15;
VB Math All of your favorite mathematical operators are available in VB: + Addition - Subtraction * Multiplication / Division \ Integer Division Mod Modulo.
An Introduction to Java – Part I, language basics
Lecture 2 Python Programming & Data Types
Manipulating Text In today’s lesson we will look at:
High Level Programming Languages
ICT Programming Lesson 4:
Lecture 2 Python Programming & Data Types
Variables In today’s lesson we will look at: what a variable is
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
The Data Element.
Java: Variables, Input and Arrays
The Data Element.
Understanding Variables
Data Types and Maths Programming Guides.
Primitive Data Types and Operators
Programming Techniques
Presentation transcript:

Chapter Four Common facilities of procedural languages

How do different programming languages differ and what do they have in common

Assignment Operator = for assigning variables A = hello; B= World; C= a + b; For math calculation we use ==

Arithmetic Operations + - / * % Relational Operations =', '>', ' '

Boolean Operators 'AND', 'OR', 'NOT'; also known as Logical Operators

Boolean Operators

Operator order

Concatenating Basically, it means taking two strings and putting them together. For example: 'FullName = FirstName + Surname' would be of little use whereas 'FullName = FirstName + ' ' + Surname' is moststrings

Extracting parts of a string Most programming languages also have the availability to extract parts of a string from either the left, right of middle Hello World Left LEFT(, ). If the string was 'Hello World!' and then the integer value was 4 then the extract would be 'Hell'.

Right RIGHT(, ). If the string was 'Hello World!' and then the integer value was 4 then the extract would be 'rld!'.

Middle MID(,, ). If the string was 'Hello World!' and then the integer values were 4 then the extract would be 'o Wo'.

Also programming languages are able to: Locating Finding the length of a string Dealing with character sets: Converting from characters into integer Comparing strings: 0-9, a-z, A-Z

Facilities Command Line A command line allows the user to type in what they want thus there is no need for clickable items just one function that allows the entry of text data. Notpad++ GUI: Alice Greenfoot?