A Level Computing#BristolMet Session Objectives U2#S6 MUST identify different data types used in programming aka variable types SHOULD describe each data.

Slides:



Advertisements
Similar presentations
Outline lecture Revise arrays Entering into an array
Advertisements

1.
Chapter 9: Advanced Array Manipulation
A Level Computing#BristolMet Session Objectives#U2 S8 MUST identify the difference between a procedure and a function SHOULD explain the need for parameters.
Chapter 10 Introduction to Arrays
Programming with Collections Collections in Java Using Arrays Week 9.
Arrays-Part 1. Objectives Declare and initialize a one-dimensional array Store data in a one-dimensional array Display the contents of a one-dimensional.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 8 Arrays.
©2004 Brooks/Cole Chapter 8 Arrays. Figures ©2004 Brooks/Cole CS 119: Intro to JavaFall 2005 Sometimes we have lists of data values that all need to be.
© The McGraw-Hill Companies, 2006 Chapter 5 Arrays.
Chapter 2: Input, Processing, and Output
Arrays.
PHYS 2020 Making Choices; Arrays. Arrays  An array is very much like a matrix.  In the C language, an array is a collection of variables, all of the.
Visual Basic: An Object Oriented Approach 3 – Making Objects Work.
Structured Data Types and Encapsulation Mechanisms to create new data types: –Structured data Homogeneous: arrays, lists, sets, Non-homogeneous: records.
Chapter 8 Arrays and Strings
1 Lab Session-III CSIT-120 Spring 2001 Revising Previous session Data input and output While loop Exercise Limits and Bounds GOTO SLIDE 13 Lab session.
ISAT 252 Introduction to Arrays. Should have read 2 Chapter 8 –pp , and pp
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
Simple Program Design Third Edition A Step-by-Step Approach
IE 212: Computational Methods for Industrial Engineering
Visual Basic: An Object Oriented Approach 5: Structured Programming.
CPS120: Introduction to Computer Science Arrays. Arrays: A Definition A list of variables accessed using a single identifier May be of any data type Can.
 2006 Pearson Education, Inc. All rights reserved Arrays.
A Level Computing#BristolMet Session ObjectivesU2#S10 MUST describe the difference between constants, local and global variables SHOULD explain why constants.
07/10/ Strings ASCII& Processing Strings with the Functions - Locate (Instr), Mid, Length (Len), Char (ChrW) & ASCII (Asc)
Introduction. 2COMPSCI Computer Science Fundamentals.
GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns.
Introduction to Computer Programming Using C Session 23 - Review.
19/10/20151 Data Structures Arrays. 219/10/2015 Learning Objectives Explain initialising arrays and reading data into arrays. Design and write routine/s.
Arrays Part 9 dbg. Arrays An array is a fixed number of contiguous memory locations, all containing data of the same type, identified by one variable.
Java Script: Arrays (Chapter 11 in [2]). 2 Outline Introduction Introduction Arrays Arrays Declaring and Allocating Arrays Declaring and Allocating Arrays.
A Level Computing#BristolMet Session Objectives#U2 S7 MUST understand the difference between an array and record SHOULD be able to estimate the size of.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Slide 1 PHP Arrays and User Defined Functions ITWA133.
Computer Programming TCP1224 Chapter 11 Arrays. Objectives Using Arrays Declare and initialize a one-dimensional array Manipulate a one-dimensional array.
I Power Higher Computing Software Development High Level Language Constructs.
CPS120: Introduction to Computer Science Lecture 15 Arrays.
1 Working with Data Structures Kashef Mughal. 2 Chapter 5  Please review on your own  A few terms .NET Framework - programming model  CLR (Common.
A Level Computing#BristolMet Session ObjectivesU2#S12 MUST describe the terms modal and pretty printing in term of input and output facilities. SHOULD.
Select (drop-down list) Inputs. Insert/Form/List Menu.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
 2008 Pearson Education, Inc. All rights reserved. 1 Arrays and Vectors.
Structuring Data: Arrays ANSI-C. Representing multiple homogenous data Problem: Input: Desired output:
GCSE Computing#BristolMet Session Objectives#8 MUST add two 8-bit binary integers SHOULD explain overflow errors COULD provide solutions to limit overflow.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
05/02/ Records. 205/02/2016 Learning Objectives State: The difference between records and arrays. The difference between records and arrays. How.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
A Level Computing#BristolMet Session Objectives#U2 S3 MUST use/read programme flow charts accurately SHOULD adapt the calculator programme to include a.
Sahar Mosleh California State University San MarcosPage 1 One Dimensional Arrays: Structured data types.
Programming Constructs Notes Software Design & Development: Computational Constructs, Data Types & Structures, Algorithm Specification.
A Level Computing#BristolMet Session Objectives#U2S11 MUST identify built-in string manipulation functions SHOULD correctly use string manipulation functions.
Programming Logic and Design Fifth Edition, Comprehensive Chapter 6 Arrays.
Arrays – two dimensional Chapter 14 This chapter explains how to do the following with a two dimensional array: Declare, use indices, obtain size, pass.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Third Edition by Tony Gaddis.
Chapter 9 Introduction to Arrays Fundamentals of Java.
Chapter 9: Data types and data structures OCR Computing for A Level © Hodder Education 2009.
Arrays An array is a sequence of objects all of which have the same type. The objects are called the elements of the array and are numbered consecutively.
Unit 2 Technology Systems
Outline lecture Revise arrays Entering into an array
Chapter 2: Input, Processing, and Output
Variables, Expressions, and IO
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Python I/O.
7 Arrays.
Data Structures – 1D Lists
Starting Out with Programming Logic & Design
Python Basics with Jupyter Notebook
Chapter 2: Input, Processing, and Output
Presentation transcript:

A Level Computing#BristolMet Session Objectives U2#S6 MUST identify different data types used in programming aka variable types SHOULD describe each data type in terms of characteristics, memory requirements and purpose. COULD explain the difference data types and data structures giving examples Write simple programmes to manipulate simple data structures

A Level Computing#BristolMet Key Words

A Level Computing#BristolMet Data Types In programming it is very important to understand the type of data you are working with as the cpu handles each differently. This becomes apparent when working with variables. TASK: Use the hodder book pg 88 and create the table to include the specifics about the 4 variables in the keywords. PRACTICAL: Now try to run the basic add calculator in Python without assigning a variable type to the user input. What happens?

A Level Computing#BristolMet Declaring variables As we know, how an item of data is stored and manipulated in the computer depends on its data types. This is why it is important to define any items of data to be used in terms of its type. When an item of data is a variable, then defining the data type is called declaring the variable. Different languages do this in different ways, some you need to declare the variable at before the code and state: 1)An indentifier (name) for the variable 2)The data type of the variable Other languages, like Python, this is done at the line of execution (statement) which is called the assignment of a variable. REVISE: Compare the 2 calculator programmes, Python & Javascript

A Level Computing#BristolMet Data Structures Often we need to manipulate many different items of data and this would become cumbersome if we had to declare each item as individual variables. Therefore to simplify data can be grouped or structured and assigned a single identifier. The structures we will look at are: arrays and records. Arrays: 1 dimensional arrays are like a list, with each item in the list being ordered by a hidden index. TASK: Run the list_array program to see the number revealed. Now change the index to print the 2 nd number, then the last, and then first – what do you notice? TASK 2: Now change the elements of the list to include text like the colours above. What happens and why?? 0123 redyellowgreenblue Index Elements

A Level Computing#BristolMet Data Structures 1 dimensional arrays continued… The lowest and highest values of the index are called the bounds. In Python the lowest is set to 0 other languages are 1 and are declared along with the array elements. TASK 3: Use a FOR loop to print all of the items in the array. P. 90 of Hodder gives you the pseudocode 2 dimensional arrays are more like a table, with the columns having an index and the rows having a separate index. A bit like a spreadsheet The declaration of this array would be: DIM A (1 to 3, 1 to 4) : Integer

A Level Computing#BristolMet Data Structures To summarise, arrays are used for storing a series of similar data items together under 1 identifier. Sometimes we need to store several different items of data together, which where records are used: For example student records: RECORD Student Name : String Gender : Character Age: Integer END RECORD TASK: Create records for all students in the class and print one specific member. EXT: Adapt the programme to allow a user to query or search for one person and print all of the details.