Introduction CSE 1310 – Introduction to Computers and Programming

Slides:



Advertisements
Similar presentations
CS 102 Computers In Context (Multimedia) 01 / 21 / 2009 Instructor: Michael Eckmann.
Advertisements

1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
1 CS1001 Lecture Overview Java Programming Java Programming Midterm Review Midterm Review.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Administrivia- Introduction CSE 373 Data Structures.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Introduction to Computers and Programming
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
Introduction to computer: storing instructions and information.
CS102 Introduction to Computer Programming
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to High-Level Language Programming
TERMS TO KNOW. Programming Language A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. Each language has.
CSE 1340 Introduction to Computing Concepts Class 2.
Introduction CSE 2320 – Algorithms and Data Structures Vassilis Athitsos University of Texas at Arlington 1.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
CS223 Algorithms D-Term 2013 Instructor: Mohamed Eltabakh WPI, CS Introduction Slide 1.
Topics Introduction Hardware and Software How Computers Store Data
INTRODUCTION TO COMPUTING
Overview of Computing. Computer Science What is computer science? The systematic study of computing systems and computation. Contains theories for understanding.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CS 102 Computers In Context (Multimedia)‏ 01 / 23 / 2009 Instructor: Michael Eckmann.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Introduction to Programming Using C Introduction to Computer Programming.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Introduction to programmable computing devices. What is a computer Computer: How was the computer developed/invented: A computer is a "reckoning" or computing.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Computer Architecture 2 nd year (computer and Information Sc.)
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 1: Introduction Data.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
The Hashemite University Computer Engineering Department
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming using Fortran 77.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
CSC 241: Introduction to Computer Science I
Chapter 1 Introduction 2nd Semester H
Lecture 1b- Introduction
Component 1.6.
Computer Engineering Department Islamic University of Gaza
Topic: Introduction to Computing Science and Programming + Algorithm
Topics Introduction Hardware and Software How Computers Store Data
CSCI-235 Micro-Computer Applications
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
GC101 Introduction to computers and programs
Syllabus Overview CSE 4309 – Machine Learning Vassilis Athitsos
Syllabus Overview CSE 6363 – Machine Learning Vassilis Athitsos
Introduction CSE 1310 – Introduction to Computers and Programming
Teaching Computing to GCSE
Introduction CSE 373 Data Structures.
Topics Introduction Hardware and Software How Computers Store Data
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Administrivia- Introduction
Administrivia- Introduction
Chapter 1 Introduction to Programming
CSC 241: Introduction to Computer Science I
Presentation transcript:

Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of this material has been created by Dr. Darin Brezeale and Dr. Gian Luca Mariottini

Goals of This Course The goal of this course is NOT to “learn Python”. Python is the programming language we will use in this class. However, the goal and focus will be on general concepts about computers and programming. Python is a good language (but not the only good language) for this task: Easier to learn than some (e.g., C or Java) Fairly popular.

Goals of This Course Understand programming: What “programming” means Basic programming techniques Writing code that achieves some simple tasks Writing code that is easy to read, understand, test Testing and debugging

Goals of This Course Understand the need for computer science: why do you need to take more classes if you already “know Python”? The answer is NOT “to learn more programming languages.”

Goals of This Course Understand the need for computer science: Computer science courses will teach you to: Write code more likely to be correct, more efficient, easier to write, read, understand, test, share, modify. Learn how to estimate if a certain programming task is feasible/doable or not. Perform more sophisticated tasks (solve math and engineering problems, play games, process images, design a programming language).

What Does a Computer Do High level: plays video and audio, displays e-mail and web pages. Middle level: executes specific software (movie player, audio player, web browser), accesses specific hardware (printer, network card, speakers, monitor): Lower level: executes specific code, namely specific instructions that humans can write and modify. Even lower level: executes assembly code, which is a sequence of simple arithmetic operations and memory transfers. Even lower level: sends back and forth electric signals within and among different components, such as the CPU, the network card, monitor, printer, camera, etc.

What Does a Computer Do High level: plays video and audio, displays e-mail and web pages. Middle level: executes specific software (movie player, audio player, web browser), accesses specific hardware (printer, network card, speakers, monitor): Lower level: executes specific code, namely specific instructions that humans can write and modify. Even lower level: executes assembly code, which is a sequence of simple arithmetic operations and memory transfers. Even lower level: sends back and forth electric signals within and among different components, such as the CPU, the network card, monitor, printer, camera, etc.

Computers and Numbers At some level, a computer can be seen as just processing numbers. At a higher level, these numbers acquire a more complex meaning: Pictures and video Music and audio Text The focus in this course is basic processing of numbers and text. Build background needed for more complex data.

Programming Programming is the process of providing specific instructions to the computer. In some ways, similar to providing instructions to a human. Key difference: humans are smart, can understand very ambiguous instructions, and even correct obvious mistakes. Programming must provide unambiguous and correct instructions (computers can do some simple error checking, but that is limited).

Example “I showed my teacher a picture of Michael Jordan. Then he gave me back my homework”. Humans have no trouble understanding such a sentence.

Example “I showed my teacher a picture of Michael Jordan. Then he gave me back my homework”. However, from a computer’s point of view, this is an ambiguous sentence.

Example “I showed my teacher a picture of Michael Jordan. Then he gave me back my homework”. However, from a computer’s point of view, this is an ambiguous sentence: Who is “he”? The teacher or Michael Jordan?

Programming Languages Computer programs must leave no room for ambiguity. A programming language defines a way to provide specific, unambiguous instructions to the computer. A programming language does not allow unambiguous instructions. Everything has a well defined meaning. No equivalents for the “kind of”, “sort of”, “like” of human languages.

Specific Meaning In a program, every single line has a very specific meaning. Extremely common source of problems for students: Thinking you can understand or write code without being able to UNDERSTAND THE EXACT MEANING OF EVERY SINGLE LINE. This often works in reading in a foreign language, even for speaking and writing. It will not work for reading or writing code.

Programming Languages Many programming languages are around: Python, C, C++, Java, JavaScript, Perl, C#, Matlab. Why that many? Each language can be preferable in specific contexts, depending on: ease of use price availability to customers quantity of already existing code support of specific features portability to different platforms. …

Programming Languages Anecdotal saying: “It should take a year to learn your first programming language, a day for the second one.” Programmers may disagree about the exact quantities, but agree on the general idea. ANOTHER VERY IMPORTANT DIFFERENCE FROM HUMAN LANGUAGES. So, the goal in this class is not “to learn Python”, but “to learn how to program”.

Structure of the Course About 10 programming assignments 40% of grade. Online submissions, using Blackboard. Late submission policy: 2% per hour. 2 midterms, one final. 60% of grade. All exams will be open-book, open-notes (just no electronic aids).

Attendance and Emergencies Attendance optional except for exams (but you are responsible for material you have missed). Any emergency causing late submissions or missing an exam must be documented in writing. The course will strictly follow UTA policies. Network or computer crashes are not an emergency.

Algorithms An algorithm is a specific process that computes the answer to a question. An algorithm is often described in English or “pseudocode”, which is half-way between English and real code. Any algorithm can be implemented in any programming language.

Example: Converting Fahrenheit to Celsius Input: temperature in Fahrenheit. Algorithm: Step 1: Subtract 32 from the input temperature. Step 2: Multiply by 5 the result of step 1. Step 3: Divide by 9 the result of Step 2. Output: the result of step 3. Note: although given in English, each step is specific and unambiguous.

Example: Summing Up Numbers Between 0 and N, take 1 Input: integer N >= 0 Step 1: initialize variable total to 0. Step 2: initialize variable current to 0. Step 3: if current > N, then exit. Step 4: replace the value of total by total+current. Step 5: increment the value of current by 1. Step 6: go to Step 3: Output: the value stored in total at the end.

Example: Summing Up Numbers Between 0 and N, take 2 Input: integer N >= 0 Step 1: set variable total to 0.5 * N * (N+1) Output: the value stored in total at the end.

Algorithm vs. Program An algorithm is a description of how to solve a problem. A program is an implementation of the algorithm in a specific programming language, that can run on a specific computer. Algorithms can be written and analyzed independent of a programming language. That is the science of Computer Science.

Simple Examples of Algorithm Analysis The first algorithm for summing numbers from 0 to N is slower than the second algorithm. The number of steps it takes the first algorithm to complete is proportional to N. The number of steps it takes the second algorithm to complete is independent of N.