CSCI/CMPE 4341 Topic: Programming in Python Chapter 1: Introduction to Python Xiang Lian The University of Texas – Pan American Edinburg, TX 78539

Slides:



Advertisements
Similar presentations
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
Advertisements

Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
COSC 120 Computer Programming
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Introduction to a Programming Environment
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to Python Programming Outline 2.1 Introduction 2.2 First Program in Python: Printing.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
CS102 Introduction to Computer Programming
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
1 Chapter-01 Introduction to Computers and C++ Programming.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Introduction 01_intro.ppt
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic
CS110/CS119 Introduction to Computing (Java)
Intro to C# Dr. John P. Abraham UTPA. Background required Thorough C++ programming – If you made an A in 1370/1170 you will do fine with some effort.
Microsoft Visual Basic 2005: Reloaded Second Edition
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.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Introduction to Computers and Programming – Computer Programming.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
©Xiaoying Gao, Peter Andreae First Java Program COMP 102 #2 2014T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
CSCI 3328 Object Oriented Programming in C# Chapter 3: Introduction to Classes and Objects UTPA – Fall
First Java Program COMP 102 #2 2015T2 Xiaoying Sharon Gao Computer Science Victoria University of Wellington.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
CSCI 3328 Object Oriented Programming in C# Chapter 1: Introduction to C# Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
Visual C++ Programming: Concepts and Projects
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
CSCI 3327 Visual Basic Chapter 3: Classes and Objects UTPA – Fall 2011.
CSCI/CMPE 4341 Topic: Programming in Python Review: Exam I Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
ECET – Dynamic Programming with Python Spring 2013 Lecture L1 – Introduction to Python Page 1 Welcome! This is Professor Jai P. Agrawal. I will walk.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Introduction to Programming
Fundamentals of Programming I Overview of Programming
Development Environment
Introduction to Programming and Visual Basic
Introduction to Python
Topic: Python’s building blocks -> Variables, Values, and Types
Introduction to Programming
Introduction to Programming
CS190/295 Programming in Python for Life Sciences: Lecture 1
Welcome to CS 1010! Algorithmic Problem Solving.
CSCI 3328 Object Oriented Programming in C# Chapter 1: Introduction to C# UTPA – Fall 2012 This set of slides is revised from lecture slides of Prof.
Welcome to CS 1010! Algorithmic Problem Solving.
CSCI 3328 Object Oriented Programming in C# Chapter 3: Introduction to Classes and Objects UTPA – Fall 2012 This set of slides is revised from lecture.
Introduction to Programming
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Presentation transcript:

CSCI/CMPE 4341 Topic: Programming in Python Chapter 1: Introduction to Python Xiang Lian The University of Texas – Pan American Edinburg, TX

Objectives In this chapter, you will – Know requirements of this course – Recall basic components in a computer system – Learn the evolution of programming language – Refresh your memory about the structured programming vs. object-oriented programming – History of Python 2

Background Required C++ Programming – If you made an A in 1370/1170 you will do fine with some effort – If you have already taken 2380, you will find this course not very difficult You need to be able to look up how to get things done (for example, look up syntax) 3

Programming, Programming, Programming This class is unlike other courses in that you will spend a lot of time doing actual programming You should never copy a program from someone else Even if your program does not perform as good as someone else’s, you should submit what you have You should not hesitate to ask questions in class 4

Assignments Unless I announce it, programs are due in one week after assignment is given in class, or posted Occasionally, I will give two weeks for difficult programs You should work on a program the same day it is assigned That way you can ask questions during the following class period 5

Use of the Textbook I will not be covering chapter by chapter I will cover important points needed to complete the assignments You need to search the index in the back to find the topic needed for each assignment You can also obtain help from websites of online resources 6

Versions of Python Python IDE software: – – Python 2.2.X – Python 3.4.X You will find differences for different versions Python – Thus, in your assignments, you need to specify which version (3.4.2 recommended) you are using 7

The Time for Class I expect to hold the class for little over an hour each time, with a 10-minute break For assignments, please do not exchange programs with each other, just ideas For projects, you can discuss the project with your study group members 8

Study Group Please form a team with 3-4 team members Each team needs to finish one programming project, including: – A project report (e.g., problem description, background, solution, implementation, experimental settings, empirical evaluation, and screen captures of graphical interface); – A statement of tasks for each team member; – Source code; – Demonstration (5 minutes); and – Presentation (10-15 minutes). 9

Python 3.4 GUI Python 3.4 Command Line 10

CSCI 1380: Elements of a Computer System Hardware – CPU – Main memory – Secondary storage – Input / Output devices Software – System programs – Application programs (e.g. Python IDE) 11

Programming Languages Machine language Assembly language High-level language – E.g., Visual Basic, C, C++, Visual C#, Java, Python 12

Structured (Procedural) Programming Technology Early Software Development – Complex and costly for businesses (1960s) Costs exceeded budgets Final products unreliable – Research led to structured programming Disciplined approach to programming – Programs clear and easy to modify Several languages resulted from research – C, Pascal, Ada 13

Object-Oriented Programming Technology We humans are very good in recognizing and working with objects, such as a pen, a dog, or a human being We learned to categorize them in such a way that make sense to us. – We may categorize them as animate object, inanimate objects, pets, friends, etc. 14

Object-Oriented Programming Technology(cont'd) We some times classify objects based on their attributes, for example, green apples or red apples, fat or slim people, etc. If you think about it each object has many attributes. – If I ask you list the attributes of an orange, you probably could list many things such as color, shape, weight, smell, etc. 15

Object-Oriented Programming Technology (cont'd) In addition to attributes, all objects exhibit behaviors. A dog eats, barks, wags its tail, plays, and begs. – A dog exhibits many more other behaviors than this short list. Another thing we need to remember about objects is that objects interact between each other 16

History of Python Created in 1989 by Guido van Rossum – Created as a scripting language for administrative tasks – Based on All Basic Code (ABC) and Modula-3 Added extensibility – Named after comic troupe Monty Python Released publicly in 1991 – Growing community of Python developers – Evolved into well-supported programming language 17

Python Python is a scripting language – It is not compiled as an executable file Python – Structured programming Like C – Object-oriented programming Like C++ Class and object 18

To Get Python Tutorial/Documentation Visit: – Python How to Program, Deitel et al. Python How to Program – Learning to Program Using Python, Cody Jackson Learning to Program Using Python – Python Documentation Python Documentation 19

Hello Program # Fig. 2.1: fig02_01.py # Printing a line of text in Python. print ("Welcome to Python Programming Class!") # Results: # Welcome to Python Programming Class! Note: parentheses are needed for Python 3.4.X, but not necessary for Python 2.2.X (used in Textbook) 20

Hello Program (cont'd) print ("Welcome to Python Programming Class!") print ("-- Xiang!") print ("Welcome to Python Programming Class! \n-- Xiang!") 21

Your First Assignment Assignment #1 The purpose of this assignment is to practice writing to shell and command-line window using Python 3.4. It is a simple assignment. – Please submit Program listing and a screen capture of the program run. – Follow the textbook examples to add comments as documentation. 22

Assignment Submission Make sure to include your name, assignment number, date due and date completed on each assignment you submit Assignment should be submitted in a zip folder with your name and assignment number appearing on the tab Submit your assignments to the Blackboard 23

Exercises Install Python 3.4 on your machine Find a good Python IDE (other than that on for programming graphical user interface (GUI) How do you output the string “Total Square Feet: 1238” to the shell/command-line window. – Assume that 1238 in an integer stored in a variable called sqFt. Describe 3 differences of Python from C++ 24

25