What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from:

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
INTRODUCTION TO PYTHON PART 1 CSC482 Introduction to Text Analytics Thomas Tiahrt, MA, PhD.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Startup – Chapter 1.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Computer Science 111 Fundamentals of Programming I Overview of Programming.
1 Chapter 2 First Java Programs Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Computer Science 101 Introduction to Programming.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Introduction to Computer Systems and the Java Programming Language.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Computer Science 101 Introduction to Programming.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Program Development C# Programming January 30, 2007 Professor J. Sciame.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Introduction to Matlab Patrice Koehl Department of Biological Sciences National University of Singapore
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
小型系統 心情 vs. 古典樂 心情 vs. 古典樂 浪漫求籤系統 美食導航系統 季潔亭雅鈺熒岱芸 美食導航系統 楊氏音樂模擬大會考人瑋 若維 芷萱 伽倩 楊氏音樂模擬大會考 麥當勞熱量計算系統 火星文困擾你嗎 ? 火星文困擾你嗎 ? 歌詞知多少 - 挑戰你的腦容量英琪 日馨 青雪 鈺娟.
7 - Programming 7J, K, L, M, N, O – Handling Data.
PHP using MySQL Database for Web Development (part II)
Basic Concepts: computer, program, programming …
Fundamentals of Programming I Overview of Programming
Lecture 1b- Introduction
Topics Introduction Hardware and Software How Computers Store Data
Programming Language Hierarchy, Phases of a Java Program
Introduction to Matlab
Key Ideas from day 1 slides
C Language VIVA Questions with Answers
Ch 1. A Python Q&A Session Bernard Chen 2007.
Python Training in Chennai
Chapter 2 First Java Programs
Introduction to Programming
Introduction to Python
Introduction to Python
Topics Introduction Hardware and Software How Computers Store Data
PHP.
Programming Fundamentals Lecture #3 Overview of Computer Programming
High Level Programming Languages
Low Level Programming Languages
Topics Designing a Program Input, Processing, and Output
Introduction to Programming with Python
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
General Computer Science for Engineers CISC 106 Lecture 03
CMPT 120 Lecture 3 - Introduction to Computing Science – Programming language, Variables, Strings, Lists and Modules.
Introduction to Python
Python Basics. Topics Features How does Python work Basic Features I/O in Python Operators Control Statements Function/Scope of variables OOP Concepts.
COMPUTING.
Introduction to Computer Science
Programming for Business Computing Introduction
Presentation transcript:

What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from: http://home.wlu.edu/~lambertk/classes/111/

The First Programmer: Countess Ada Lovelace Wrote some programs intended to run on Babbage’s Analytical Engine circa 1830

Programming in the 1940s The first running programs were loaded by rearranging wires or flipping switches on the computer

High-Level Programming Languages Code a program in a high level language that’s close to English Run another program to translate it to instructions that the computer hardware can understand Such translator programs are called compilers

Grace Murray Hopper and the First Compiler Created the first compiler to translate a human-readable program to machine code in 1952 Created COBOL (COmmon Business-Oriented Language) for data processing applications in 1959

Why Python? Real-world advantages Pedagogical advantages Systems programming Graphical user interfaces Internet scripting Component integration Database programming Rapid prototyping Very simple syntax Highly interactive Easy to learn and use Extensive libraries of high-level resources Completely portable, free, and open source Widespread user (programmer) community

Obtaining Python Python was invented by Guido van Rossum in 1992 Python comes with most Unix-based computer systems Python for Windows or any other operating system can be downloaded from http://www.python.org/

Basic Elements: Data Numbers Strings: ‘Hi there!’, “Hi there!”, ‘\n’ Integers: 3, 77 Floats: 3.14, .22 Strings: ‘Hi there!’, “Hi there!”, ‘\n’ Truth values (Booleans): True, False

Basic Operations: Arithmetic Symbol Meaning Example + Addition or concatenation x + y - Subtraction x - y * Multiplication x * y / or // Division x / y or x // y % Remainder x % y ** Exponentiation x ** y

Built-In Functions A function is an operation that expects zero or more data values (arguments) from its user and computes and returns a single data value Examples: abs(-5) max(33, 66)

Library Functions A library is a collection of resources, including functions, that can be imported for use in a program Example: import math math.sqrt(2)

Variables and Assignment Variables are used to name data and other resources Instead of typing 3.14 for π, define a variable named pi to mean 3.14 Assignment (=) is used to set (or reset) a variable to a value pi = 3.14 34 * 34 * pi Variables make programs more readable and maintainable

Library Variables Typically define standard constants, such as pi and e Example: import math 3 * math.pi Or: from math import pi 3 * pi

Script Mode Longer programs can be edited and saved to a file and then run as scripts (synonymous with programs) Repl.it

Developing a Python Script Repl.it editor Python source code Python compiler Byte code Python Virtual Machine (PVM) Inputs from user Outputs to user