School of Computing and Mathematics, University of Huddersfield Computing Science: WEEK 17 Announcement: next few weeks… 9 nd Feb: Comparative Programming.

Slides:



Advertisements
Similar presentations
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Comparison of OO with other.
Advertisements

1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Lesson 6 Software and Hardware Interaction
Lecture 14 Go over midterm results Algorithms Efficiency More on prime numbers.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Formal Aspects of Computer Science – Week 12 RECAP Lee McCluskey, room 2/07
Describing Syntax and Semantics
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 11 Management Decision Making.
Standard 1 - Objective 2: Understand, evaluate, and use computer software.
Prof. R. Willingale Department of Physics and Astronomy 2nd Year C+R 2 nd Year C and R Workshop Part of module PA2930 – 2.5 credits Venue: Computer terminal.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
PRESENTATION START.
Dr. Ken Hoganson, © August 2014 Programming in R STAT8030 Programming in R COURSE NOTES 1: Hoganson Programming Languages.
Languages and Environments Higher Computing Unit 2 – Software Development.
1 Software Development Topic 2 Software Development Languages and Environments.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
B. Ross Cosc 4f79 1 Commercial tools Size of system: –small systems 400 rules single user, PC based –larger systems narrow, problem-type specific or hybrid.
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Evolution of Programming Languages Generations of PLs.
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
Introduction to algorithm design and recursion CS125 Spring 2007 Arthur Kantor.
Computer Science Department Data Structure & Algorithms Lecture 8 Recursion.
1 Java/MP Multiparadigm Programming Language by Roshan Naik Advisor: Dr. Timothy Budd Estimated Time: 60 mins.
Oracle Data Integrator Procedures, Advanced Workflows.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
ARTIFICIAL INTELLIGENCE DR. ABRAHAM AI a field of computer science that is concerned with mechanizing things people do that require intelligent.
Recursion. What is recursion? Rules of recursion Mathematical induction The Fibonacci sequence Summary Outline.
Algorithm Design.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
CS 331, Principles of Programming Languages Chapter 1.
Structured Programming (4 Credits)
COMP307 Artificial Intelligence Xiaoying Gao Victoria University of Wellington Lecture 2:1 
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
W1-1 University of Washington Computer Programming I Recursion © 2000 UW CSE.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 10: Tools.
From Conventional Languages to Prolog –What we can do in conventional languages but not in Prolog –What we can do in Prolog but not in conventional languages.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
CSC 212 – Data Structures Lecture 15: Big-Oh Notation.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
CS 501: Software Engineering Fall 1999 Lecture 23 Design for Usability I.
Chapter 14 Functions.
Collision Theory and Logic
Topic: Introduction to Computing Science and Programming + Algorithm
Programming paradigms
Introduction to programming languages, Algorithms & flowcharts
Chapter 15 Recursion.
Topic: Programming Languages and their Evolution + Intro to Scratch
Introduction to programming languages, Algorithms & flowcharts
PROGRAMMING LANGUAGES
Collision Theory and Logic
Chapter 15 Recursion.
CS 21a: Intro to Computing I
Introduction to programming languages, Algorithms & flowcharts
Software Programming J. Holvikivi 2014.
Algorithms & Pseudocode
Recursion Data Structures.
Cs212: DataStructures Computer Science Department Lab 3 : Recursion.
A programming language
ICT Gaming Lesson 2.
Main() { int fact; fact = Factorial(4); } main fact.
Presentation transcript:

School of Computing and Mathematics, University of Huddersfield Computing Science: WEEK 17 Announcement: next few weeks… 9 nd Feb: Comparative Programming Languages + Prolog - TLMc 16 th Feb: Prolog - TLMc 23 rd Feb: Prolog - TLMc

School of Computing and Mathematics, University of Huddersfield Computing Science: WEEK 17 LECTURE: Comparative Programming Languages + Prolog PRACTICALS: Follow notes on Blackboard OR on web – - Use a web browser and follow instructions!

School of Computing and Mathematics, University of Huddersfield Languages for Computers n A great percentage of people in the world use computers nowadays – they run application tools and packages such as games, photo manipulation, , spreadsheets, information retrieval, word processing, web browsers ….. n The language of interface has to be simple and specific to the application – usually clicking a mouse on a menu. n These tools and packages are specific and confined – its not possible to create OTHER tools and packages from them..

School of Computing and Mathematics, University of Huddersfield Languages for Computers n Computing scientists and engineers need to know how to design, implement, maintain, test. evaluate etc these applications n To do so you must to some extent ‘unlearn’ the pointing, clicking, dragging, dropping of the masses – you need to learn Programming, Design, Database, Specification, Web Languages and expert development environments and open operating systems such as Unix.

School of Computing and Mathematics, University of Huddersfield Algorithms Fundamental to being a computer expert is the knowledge of ‘Algorithms’. An Algorithm is a step by step (or systematic) method of solving a problem written in enough detail so that a computer can carry it out. You encode Algorithms using Programming Languages.

School of Computing and Mathematics, University of Huddersfield Programming Languages – Procedural There are literally thousands of Programming Languages. Most are PROCEDURAL (or STATE based) because they rely on storing data values (or objects) in VARIABLES. Steps in an algorithm update the values in the variables until a desired result. Example: Static int factorial(int n) { m = 1; while (n > 0) {m=n*m; n=n-1;} return m; } If n >= 0 this returns the factorial of n.

School of Computing and Mathematics, University of Huddersfield Programming Languages – Functional n Algorithms can be represented functionally. Functional languages use no assignment or loops. n Algorithm execution is carried out by function evaluation. Example: factorial(n) = if (n = 0) then 1 else n*factorial(n-1) If n >= 0 this returns the factorial of n.

School of Computing and Mathematics, University of Huddersfield Programming Languages – Logical n Algorithms can be represented as logic rules and facts. Logic languages use recursive rules to encode ‘loops’. n Algorithm execution is carried out by matching and logical inference. Example: factorial(0,1). factorial(1,1). factiorial(N,M) :- P is N-1, factorial(P,Q), M is N*Q. If N >= 0 this returns the factorial of N.

School of Computing and Mathematics, University of Huddersfield Programming Languages – PROLOG n Prolog is a logic language n It is used in research and development applications, in prototyping, and in areas such as language processing and artificial intelligence n It is an INTERPRETED language –you do not need to COMPILE code. You run the Prolog interpreter, load in your Prolog program, and run it. n Prolog programs are lists of facts and rules.

School of Computing and Mathematics, University of Huddersfield Summary - Algorithms are detailed, step by step methods for solving problems - We encode algorithms using programming languages - There are thousands of programming languages – most are PROCEDURAL (they include sequences of commands) - There are two other important ways to encode algorithms – functional and logical - Prolog is an important logical language which we will look at for the next few weeks