ENGR 102 Engineering Lab I - Computation

Size: px
Start display at page:

Download "ENGR 102 Engineering Lab I - Computation"

Transcription

1 ENGR 102 Engineering Lab I - Computation Learning Objectives by Week 1 ENGR 102 Engineering Lab I Computation 2 Credits 2. Introduction to the design and development of computer applications for engineers; computation to enhance problem solving abilities; basic concepts of software design through the implementation and debugging of student-written programs; introduction to engineering majors, career exploration, engineering practice within realistic constraints, e.g. economic, environmental, ethical, health and safety, and sustainability; pathways to success in engineering. Prerequisites: Grade of C or better in MATH 151, or concurrent enrollment; admission to the College of Engineering. Upon successful completion of this course, students will be able to design, create, and execute computer programming solutions to engineering problems. To achieve this goal, students will learn to: 3 Demonstrate the use of basic programming techniques in the construction of computer programs, including techniques to: 1 The learning objects in this document are based closely on those prepared by Dr. John Keyser for the Pilot Course version of ENGR This text reports the listing in the Texas A&M University course catalog 3 These are the overall course objectives that will be achieved through all of the activities of the course. Collect, store, and manipulate data within a computer program Collect, create, store, and manipulate data in larger structures, such as arrays, matrices, and lists Use control structures, such as conditional statements and loops, in computer programs Declare and use functions to solve computing-related problems Analyze data from a file and output processed results to a file Decompose a complicated task into more manageable pieces Apply programming techniques to solve problems in engineering and calculus, including: Applying vector and matrix manipulation of data to solve engineering problems Graphically plotting data to visualize basic calculus concepts Manipulating data to numerically calculate derivatives in the context of engineering applications Applying conditional statements and loops to implement numerical methods, such as bisection and Newton s method

2 2 engr Complete a team programming assignment that ties together concepts learned in the class Complete the required homework assignments for introduction to engineering majors, engineering practice, and student success. To meet these objectives, the remaining sections present the learning objectives for each week of the course.

3 engr 102 engineering lab i - computation 3 Week 1 Welcome, Why Programming?, and Introduction Understand why we are teaching computing in the introduction to Engineering course and develop some appreciation for why it is good for you to learn. Understand the basic process from writing a program to executing it Compiling/Interpreting The use of an Integrated Design Environment (IDE) Understand the purpose of programming languages See the print statement, for printing both text and numbers See the effect of sequential commands (multiple print statements) Learn how access mathematical functions in the math package See the use of a mathematical function call Download and install Python (Anaconda) onto your BYOD computer Download and install PyCharm onto your BYOD computer Write and execute an initial Hello, World! program Write and execute a program using mathematical functions Understand what happens when program code has an error Follow the process of submitting files in ecampus Write programs that output data using the print command Write programs that perform mathematical computations, including using mathematical functions See some calculations that might be performed in a variety of engineering applications See some calculations that might be performed related to calculus (e.g., limits)

4 4 engr Week 2 Variables, Assignment, and Sequential Steps Understand what a variable is a programming tool for holding data with an identifier (i.e., a variable name) Learn rules of Python naming and what makes a good name Understanding of assignment to variables and the structure of an assignment statement Including assigning new values to variables Understand order of evaluation Right hand side before left in an assignment statement (including using the same variable name on the left and the right) Earlier statements before later statements (sequential computation) Learn the use of the operator-assignment statements (+=, -=, etc.) Practice with generating sequential instructions (even in a nonprogramming setting) Understand the role of the user analysis adapting a task to the goal of the audience Identify sequential instructions in an engineering application Practice identifying variables to use, determining variable names, and performing basic calculations on those variables Identify appropriate variables to use in a computation and choose good variable names Construct a non-trivial program, using appropriate variable names, to perform some calculation Understand how basic individual computations can be put together to create more complex computations Understand the process of linear interpolation between two data points

5 engr 102 engineering lab i - computation 5 Week 3 Input / output and data types Understand types for variables Integer, Float, Boolean, String Understand what each type can represent Understand string usage Specifying literals (single/double quotes) Concatenation Understand how to convert between types Understand how types can cause operations to behave differently Learn how to obtain input (text input from console) Understand that all input arrives as a string Learn some simple output formatting techniques Practice unit conversion Practice use of different operations on different types Practice writing a program that involves Getting input from a user Using different types of data Formatting output Practice writing programs that involve: Getting data from a user Converting data types Performing calculations Outputting information to a user Learn about special characters using the escape sequence (\n, \t, etc.) Perform very basic vector math operations

6 6 engr Week 4 Conditional statements, Boolean expressions, and if/elifelse Learn to identify and write procedures with branching Using relational operators to create Booleans Be able to generate Boolean expressions with and, or, not, as well as parentheses () Understand that there is an order of operations, but encourage use of parentheses Be able to create if conditionals if statements understand structure and use Understand meaning of indentation and use of multiple lines of code indented Be able to use else conditions and combine them with elif statements to create more complex conditionals else clause understand use elif clause - understand use Understand nesting of conditionals Understand differences between use of nesting and multiple if/elif/else Practice writing programs that involve conditions Checking relations between values to determine Boolean conditions Implementing a condition in the code and practice using branching with if/elif/else Introduce idea of numerical error and tolerances Give practice writing Boolean expressions (with and, or, not) Write programs that require implementing multiple conditionals and branching

7 engr 102 engineering lab i - computation 7 Week 5 Creating and testing larger programs Understand differences between writing larger programs versus just small snippets of code Understand various ways that comments can be used Help students understand the need to think through a program before just coding Demonstrate the way testing can be done Show how to generate good sets of tests Describe the importance of incremental development and testing (pyramids versus arches) Work through construction of a larger program List variables and steps to take Plan tests to use Include comments Construct incrementally Show Engineering application Construct a larger program on your own, following the same process as in the lab

8 8 engr Week 6 Loops and iteration Understand while loops as indefinite repetition Emphasize that condition is checked only at the start (end) of the loop Understand an infinite loop and how to break out of it Understand use of for loops over a range Understand nesting of loops Understand use of break and continue statements (optional) Use an indefinite (while) loop to compute a value Demonstrate bisection to find a root Demonstrate numerical differentiation Use a while loop to compute a function until a goal is reached Use a while loop to take input until a specific value is entered Use a for loop to evaluate a series of values Use nested loops

9 engr 102 engineering lab i - computation 9 Week 7 Arrays and lists of data Understand lists as a way of collecting lots of similar data together Understand indexing into a list, reading and assigning values to list elements Differentiate the four Python data types for array-like data: lists, tuples, dictionaries, and numpy arrays. Getting the length of a list using the len command Accessing using negative values Understanding out-of-range errors Use of a for loop to go through list elements Understand list modifications Initialization of a list using [] format Appending using the.append() list method Concatenating lists together using + Assigning to sliced lists Understand slicing as generating sublists/indexes into lists Treating strings as non-editable lists (more like tuples) Creating lists of lists Understanding similarities and differences between the concepts above for lists and the parallel concepts for tuples, dictionaries, and numpy arrays. Understand dictionaries as allowing key-value pairs Create programs that read in data and perform processing on it, then output information, e.g., computing median, analyzing statistics Create a program that uses a 2-D array (list of lists) Use each array-like data type (list, tuple, dictionary, and numpy array) at least once in a program.

10 10 engr Create programs that manipulate strings or other existing lists Use lists to do basic vector math (addition, subtraction, magnitude, dot product) Use numpy to simplify mathematics with array-like data Use matplotlib.pyplot to plot numpy arrays.

11 engr 102 engineering lab i - computation 11 Week 8 Top-down design of programs Understand the top-down design process Understand how to construct a program using top-down design Approach a design problem (outside of computer programming) in a top-down fashion Design a program using a top-down approach (e.g., Linear interpolation for arbitrary points) No individual assignment plan to study/review for midterm Review the learning objectives for Weeks 1 through 7

12 12 engr Week 9 Midterm Exam and file input / output Understand the role of files (long-term and larger data storage) Understand the basic open/process/close operations on files Understand use of file data type in Python, Know proper ways to open and close files Using open() and close() Using with and as Understand writing (strings) to files using the write command Understand ways to read from a file Using the readline() command Using a for loop Optional: using other commands like read(), readlines(), list() Understand the split() operation for breaking up a string into elements Introduce explicitly the idea of member functions for a type (class) i.e., object methods. Idea has been seen previously and discussed. Methods of file objects include: close(), write(), readline(). Methods of str objects include: split and strip() Practice writing a file (read in information from a user or generate data and write to a file) Practice reading in a file (potentially the same as the one written) for some operation Practice reading and writing a file (could be very basic) Practice reading in a larger, externally-defined data file for processing

13 engr 102 engineering lab i - computation 13 Week 10 User-defined Functions Understand role of functions as a way of separating a piece of code from others Understand structure of a function call (name and parentheses, possibly taking arguments) Understand returning a value from a function Understand tuples as a way of grouping together data And passing back multiple values from a function Understand that they are immutable as opposed to lists Understand the role of modules in terms of code reuse, saving work, etc. Understand importing modules and calling functions defined in them Basic import of an entire module, followed by module-specific function calls Importing using the from <x> import <y> format, followed by function calls, including use of as Understand packages as hierarchy of modules Learn to define functions using the def command and call those functions in code Understand parameter passing as pass-by-value Understand return command for returning values Using tuples to return multiple values from functions Using tuple assignment statements to unpack multiple returned values from the function into separate variables Understand scope of variables Variables defined in a function Global variables, including declaring globals Practice generating functions to perform basic operations, including taking in parameters and returning a value Organize user-defined functions into custom modules. Implement bisection method for root finding using user-defined modules.

14 14 engr Practice writing functions (basic functions) Implement a simple integration technique

15 engr 102 engineering lab i - computation 15 Week 11 Writing Functions and Using User-Defined Functions Learn to call functions from within other functions Understand the function call stack (intuitively) Not dealing with recursion, though Understand scope of variables Local parameters Setting default parameters Learn to pass user-defined function to numerical methods in scipy Create user-defined functions that contain the particular equation you want to solve. Find scipy packages and functions that perform the needed numerical method Demonstrate integration, root-finding, interpolation, and solving a one-dimensional ordinary differential equation (ODE) Understand passing parameters to your user-defined function through the args=() parameter of the scipy functions Learn about sources for finding modules to import Default modules: the Python Library Reference External sources: PyPi * Using pip to install Optional: Understanding lists as mutable data Understanding that lists are essentially a pointer Understand that copying a pointer is not the same as copying the values it points to Practice generating functions to perform basic operations Including taking in parameters and returning a value Including passing functions to functions and handling the function parameters Implement Newton s method for root-finding Use scipy functions to perform integration and interpolation

16 16 engr Practice writing functions use scipy functions to perform root-finding and for solving ordinary differential equations (ODEs).

17 engr 102 engineering lab i - computation 17 Week 12 Functions and their use in top-down and bottom-up design Understand how to use top-down design with functions, making functions for each flow chart node Understand how to use bottom-up design to build software, starting with bottom-level functions and gradually building functions that call on or from each other Understand documentation of functions using docstrings (triplequotes) Use a bottom-up design to create functionality Use a top-down design to create a program (possibly with same code as bottom-up) Implement calculation of first and second derivatives Add randomness to a simulationx Use design approaches to create a more complex program

18 18 engr Week 13 Systematic debugging Understand types of errors that can be encountered Understand how to catch run-time errors using try...except structures Understand debugging as a precise process Understand use of the debugger in an IDE Setting breakpoints Stepping-over, Stepping-into Call stack Variable Watch Lists Given a buggy program, find the bugs and debug it Team project: larger project that will incorporate most parts of the class together. Begin work on large project (as a team) Work on team project

19 engr 102 engineering lab i - computation 19 Week 14 Classes and Programming with Objects Learn to create user-defined objects using the class structure Understand object instantiation and the initializer method Including passing parameters to the object initializer Storing parameters as attributes of an object Accessing object attributes using the <objname>.<paramname> and self.<paramname format Include methods in an object using object functions Create at least one object within the group project code. Work on group project Work on group project

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Python review. 1 Python basics. References. CS 234 Naomi Nishimura

Python review. 1 Python basics. References. CS 234 Naomi Nishimura Python review CS 234 Naomi Nishimura The sections below indicate Python material, the degree to which it will be used in the course, and various resources you can use to review the material. You are not

More information

Webgurukul Programming Language Course

Webgurukul Programming Language Course Webgurukul Programming Language Course Take One step towards IT profession with us Python Syllabus Python Training Overview > What are the Python Course Pre-requisites > Objectives of the Course > Who

More information

Introduction to: Computers & Programming: Review prior to 1 st Midterm

Introduction to: Computers & Programming: Review prior to 1 st Midterm Introduction to: Computers & Programming: Review prior to 1 st Midterm Adam Meyers New York University Summary Some Procedural Matters Summary of what you need to Know For the Test and To Go Further in

More information

ENGR 102 Engineering Lab I - Computation

ENGR 102 Engineering Lab I - Computation ENGR 102 Engineering Lab I - Computation Week 07: Arrays and Lists of Data Introduction to Arrays In last week s lecture, 1 we were introduced to the mathematical concept of an array through the equation

More information

Part III Appendices 165

Part III Appendices 165 Part III Appendices 165 Appendix A Technical Instructions Learning Outcomes This material will help you learn how to use the software you need to do your work in this course. You won t be tested on it.

More information

Introduction to Python Part 2

Introduction to Python Part 2 Introduction to Python Part 2 v0.2 Brian Gregor Research Computing Services Information Services & Technology Tutorial Outline Part 2 Functions Tuples and dictionaries Modules numpy and matplotlib modules

More information

CS 2316 Learning Objectives

CS 2316 Learning Objectives CS 2316 Learning Objectives This document lists the CS 2316 Learning Objectives and tries to give you an idea of what each learning objective encompases. Each learning objective will have a list of concepts

More information

CIS192 Python Programming. Robert Rand. August 27, 2015

CIS192 Python Programming. Robert Rand. August 27, 2015 CIS192 Python Programming Introduction Robert Rand University of Pennsylvania August 27, 2015 Robert Rand (University of Pennsylvania) CIS 192 August 27, 2015 1 / 30 Outline 1 Logistics Grading Office

More information

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and

More information

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING GE8151 - PROBLEM SOVING AND PYTHON PROGRAMMING Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING 1) Define Computer 2) Define algorithm 3) What are the two phases in algorithmic problem solving? 4) Why

More information

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd. Python Training Complete Practical & Real-time Trainings A Unit of. ISO Certified Training Institute Microsoft Certified Partner Training Highlights : Complete Practical and Real-time Scenarios Session

More information

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital PYTHON FOR MEDICAL PHYSICISTS Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital TUTORIAL 1: INTRODUCTION Thursday 1 st October, 2015 AGENDA 1. Reference list 2.

More information

C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

More information

CIS192: Python Programming

CIS192: Python Programming CIS192: Python Programming Introduction Harry Smith University of Pennsylvania January 18, 2017 Harry Smith (University of Pennsylvania) CIS 192 Lecture 1 January 18, 2017 1 / 34 Outline 1 Logistics Rooms

More information

CSI33 Data Structures

CSI33 Data Structures Outline Department of Mathematics and Computer Science Bronx Community College October 24, 2018 Outline Outline 1 Chapter 8: A C++ Introduction For Python Programmers Expressions and Operator Precedence

More information

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++ Introduction to Programming in C++ Course Text Programming in C++, Zyante, Fall 2013 edition. Course book provided along with the course. Course Description This course introduces programming in C++ and

More information

Statements 2. a operator= b a = a operator b

Statements 2. a operator= b a = a operator b Statements 2 Outline Note: i=i+1 is a valid statement. Don t confuse it with an equation i==i+1 which is always false for normal numbers. The statement i=i+1 is a very common idiom: it just increments

More information

[CHAPTER] 1 INTRODUCTION 1

[CHAPTER] 1 INTRODUCTION 1 FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2

More information

3D Graphics Programming Mira Costa High School - Class Syllabus,

3D Graphics Programming Mira Costa High School - Class Syllabus, 3D Graphics Programming Mira Costa High School - Class Syllabus, 2009-2010 INSTRUCTOR: Mr. M. Williams COURSE GOALS and OBJECTIVES: 1 Learn the fundamentals of the Java language including data types and

More information

Exam 1 Format, Concepts, What you should be able to do, and Sample Problems

Exam 1 Format, Concepts, What you should be able to do, and Sample Problems CSSE 120 Introduction to Software Development Exam 1 Format, Concepts, What you should be able to do, and Sample Problems Page 1 of 6 Format: The exam will have two sections: Part 1: Paper-and-Pencil o

More information

Python Basics. Lecture and Lab 5 Day Course. Python Basics

Python Basics. Lecture and Lab 5 Day Course. Python Basics Python Basics Lecture and Lab 5 Day Course Course Overview Python, is an interpreted, object-oriented, high-level language that can get work done in a hurry. A tool that can improve all professionals ability

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 60 20 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E I SEMESTER GE85- Problem Solving and Python Programming Regulation 207 Academic

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

DEBUGGING TIPS. 1 Introduction COMPUTER SCIENCE 61A

DEBUGGING TIPS. 1 Introduction COMPUTER SCIENCE 61A DEBUGGING TIPS COMPUTER SCIENCE 61A 1 Introduction Every time a function is called, Python creates what is called a stack frame for that specific function to hold local variables and other information.

More information

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs.

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs. Java SE11 Development Java is the most widely-used development language in the world today. It allows programmers to create objects that can interact with other objects to solve a problem. Explore Java

More information

CS Computer Science I

CS Computer Science I CS 1309-001 Computer Science I Fall 2017, Sul Ross State University Instructor: Dr. Kennard Laviers Office Location: ACR 107 Office Phone: 432-837- 8500 Email: kennard.laviers@sulross.edu Office Hours:

More information

CME 193: Introduction to Scientific Python Lecture 1: Introduction

CME 193: Introduction to Scientific Python Lecture 1: Introduction CME 193: Introduction to Scientific Python Lecture 1: Introduction Nolan Skochdopole stanford.edu/class/cme193 1: Introduction 1-1 Contents Administration Introduction Basics Variables Control statements

More information

Programming to Python

Programming to Python Programming to Python Sept., 5 th Slides by M. Stepp, M. Goldstein, M. DiRamio, and S. Shah Compiling and interpreting Many languages require you to compile (translate) your program into a form that the

More information

ARTIFICIAL INTELLIGENCE AND PYTHON

ARTIFICIAL INTELLIGENCE AND PYTHON ARTIFICIAL INTELLIGENCE AND PYTHON DAY 1 STANLEY LIANG, LASSONDE SCHOOL OF ENGINEERING, YORK UNIVERSITY WHAT IS PYTHON An interpreted high-level programming language for general-purpose programming. Python

More information

ENGR 101 Engineering Design Workshop

ENGR 101 Engineering Design Workshop ENGR 101 Engineering Design Workshop Lecture 2: Variables, Statements/Expressions, if-else Edgardo Molina City College of New York Literals, Variables, Data Types, Statements and Expressions Python as

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

More information

STATS 507 Data Analysis in Python. Lecture 2: Functions, Conditionals, Recursion and Iteration

STATS 507 Data Analysis in Python. Lecture 2: Functions, Conditionals, Recursion and Iteration STATS 507 Data Analysis in Python Lecture 2: Functions, Conditionals, Recursion and Iteration Functions in Python We ve already seen examples of functions: e.g., type()and print() Function calls take the

More information

Boca Raton Community High School AP Computer Science A - Syllabus 2009/10

Boca Raton Community High School AP Computer Science A - Syllabus 2009/10 Boca Raton Community High School AP Computer Science A - Syllabus 2009/10 Instructor: Ronald C. Persin Course Resources Java Software Solutions for AP Computer Science, A. J. Lewis, W. Loftus, and C. Cocking,

More information

Course Introduction and Python Basics

Course Introduction and Python Basics Course Introduction and Python Basics Johan Falkenjack 2018-01-15 Course Introduction Python > Data Science 3 hp pass/fail 3 lectures, 3 labs (2 sessions for each lab) Python Basics Programming Paradigms

More information

Objectives. Chapter 4: Control Structures I (Selection) Objectives (cont d.) Control Structures. Control Structures (cont d.) Relational Operators

Objectives. Chapter 4: Control Structures I (Selection) Objectives (cont d.) Control Structures. Control Structures (cont d.) Relational Operators Objectives Chapter 4: Control Structures I (Selection) In this chapter, you will: Learn about control structures Examine relational and logical operators Explore how to form and evaluate logical (Boolean)

More information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D 1/58 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.

More information

2. Explain the difference between read(), readline(), and readlines(). Give an example of when you might use each.

2. Explain the difference between read(), readline(), and readlines(). Give an example of when you might use each. CMSC 0 Fall 0 Name Final Review Worksheet This worksheet is NOT guaranteed to cover every topic you might see on the exam. It is provided to you as a courtesy, as additional practice problems to help you

More information

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces

More information

PREPARING FOR PRELIM 1

PREPARING FOR PRELIM 1 PREPARING FOR PRELIM 1 CS 1110: FALL 2012 This handout explains what you have to know for the first prelim. There will be a review session with detailed examples to help you study. To prepare for the prelim,

More information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D 1/60 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University CS 112 Introduction to Computing II Wayne Snyder Department Boston University Today: Java basics: Compilation vs Interpretation Program structure Statements Values Variables Types Operators and Expressions

More information

Problem Solving with C++

Problem Solving with C++ GLOBAL EDITION Problem Solving with C++ NINTH EDITION Walter Savitch Kendrick Mock Ninth Edition PROBLEM SOLVING with C++ Problem Solving with C++, Global Edition Cover Title Copyright Contents Chapter

More information

Total Test Questions: 43 Levels: Grades Units of Credit:.50

Total Test Questions: 43 Levels: Grades Units of Credit:.50 DESCRIPTION Computer Programming IA introduces students to the fundamentals of computer programming. Students will learn to design, code, and test their own programs while applying mathematical concepts.

More information

ENGR 102 Engineering Lab I - Computation

ENGR 102 Engineering Lab I - Computation ENGR 102 Engineering Lab I - Computation Week 03: Data Types and Console Input / Output Introduction to Types As we have already seen, 1 computers store numbers in a binary sequence of bits. The organization

More information

CS Summer 2013

CS Summer 2013 CS 1110 - Summer 2013 intro to programming -- how to think like a robot :) we use the Python* language (www.python.org) programming environments (many choices): Eclipse (free from www.eclipse.org), or

More information

Introduction to Python

Introduction to Python Introduction to Python EECS 4415 Big Data Systems Tilemachos Pechlivanoglou tipech@eecs.yorku.ca 2 Background Why Python? "Scripting language" Very easy to learn Interactive front-end for C/C++ code Object-oriented

More information

Introduction to Computer Science with Python Course Syllabus

Introduction to Computer Science with Python Course Syllabus CodeHS Introduction to Computer Science with Python Course Syllabus Course Overview and Goals The CodeHS Introduction to Computer Science in Python course teaches the fundamentals of computer programming

More information

Chapter 4: Control Structures I (Selection) Objectives. Objectives (cont d.) Control Structures. Control Structures (cont d.

Chapter 4: Control Structures I (Selection) Objectives. Objectives (cont d.) Control Structures. Control Structures (cont d. Chapter 4: Control Structures I (Selection) In this chapter, you will: Objectives Learn about control structures Examine relational and logical operators Explore how to form and evaluate logical (Boolean)

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

ENGR (Socolofsky) Week 07 Python scripts

ENGR (Socolofsky) Week 07 Python scripts ENGR 102-213 (Socolofsky) Week 07 Python scripts A couple programming examples for this week are embedded in the lecture notes for Week 7. We repeat these here as brief examples of typical array-like operations

More information

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1 Review Midterm Exam 1 Review Midterm Exam 1 Exam on Monday, October 7 Data Types and Variables = Data Types and Variables Basic Data Types Integers Floating Point Numbers Strings Data Types and Variables

More information

Table of Contents. Preface... xxi

Table of Contents. Preface... xxi Table of Contents Preface... xxi Chapter 1: Introduction to Python... 1 Python... 2 Features of Python... 3 Execution of a Python Program... 7 Viewing the Byte Code... 9 Flavors of Python... 10 Python

More information

COP 1220 Introduction to Programming in C++ Course Justification

COP 1220 Introduction to Programming in C++ Course Justification Course Justification This course is a required first programming C++ course in the following degrees: Associate of Arts in Computer Science, Associate in Science: Computer Programming and Analysis; Game

More information

Loops and Conditionals. HORT Lecture 11 Instructor: Kranthi Varala

Loops and Conditionals. HORT Lecture 11 Instructor: Kranthi Varala Loops and Conditionals HORT 59000 Lecture 11 Instructor: Kranthi Varala Relational Operators These operators compare the value of two expressions and returns a Boolean value. Beware of comparing across

More information

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python I. Some material adapted from Upenn cmpe391 slides and other sources Python I Some material adapted from Upenn cmpe391 slides and other sources Overview Names & Assignment Data types Sequences types: Lists, Tuples, and Strings Mutability Understanding Reference Semantics

More information

Advanced Algorithms and Computational Models (module A)

Advanced Algorithms and Computational Models (module A) Advanced Algorithms and Computational Models (module A) Giacomo Fiumara giacomo.fiumara@unime.it 2014-2015 1 / 34 Python's built-in classes A class is immutable if each object of that class has a xed value

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Lecture 1 Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Welcome to ENGR 102 Syllabus review Your Time Expectations (in

More information

Mathematics/Science Department Kirkwood Community College. Course Syllabus. Computer Science CSC142 1/10

Mathematics/Science Department Kirkwood Community College. Course Syllabus. Computer Science CSC142 1/10 Mathematics/Science Department Kirkwood Community College Course Syllabus Computer Science CSC142 Bob Driggs Dean Cate Sheller Instructor 1/10 Computer Science (CSC142) Course Description Introduces computer

More information

Part I. Wei Tianwen. A Brief Introduction to Python. Part I. Wei Tianwen. Basics. Object Oriented Programming

Part I. Wei Tianwen. A Brief Introduction to Python. Part I. Wei Tianwen. Basics. Object Oriented Programming 2017 Table of contents 1 2 Integers and floats Integer int and float float are elementary numeric types in. integer >>> a=1 >>> a 1 >>> type (a) Integers and floats Integer int and float

More information

Python Evaluation Rules

Python Evaluation Rules Python Evaluation Rules UW CSE 160 https://courses.cs.washington.edu/courses/cse160/15sp/ Michael Ernst and Isaac Reynolds mernst@cs.washington.edu April 1, 2015 Contents 1 Introduction 2 1.1 The Structure

More information

AP Computer Science AB

AP Computer Science AB AP Computer Science AB Dr. Tyler Krebs Voice Mail: 431-8938 Classroom: B128 Office: TV Studio Characteristics We Value in This Classroom: 1. Respect. (Show respect for everyone and everything.) 2. Integrity.

More information

Course Outline - COMP150. Lectures and Labs

Course Outline - COMP150. Lectures and Labs Course Outline - COMP150 Lectures and Labs 1 The way of the program 1.1 The Python programming language 1.2 What is a program? 1.3 What is debugging? 1.4 Experimental debugging 1.5 Formal and natural languages

More information

College Board. AP CS A Labs Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013.

College Board. AP CS A Labs Magpie, Elevens, and Picture Lab. New York: College Entrance Examination Board, 2013. AP Computer Science August 2014 June 2015 Class Description AP Computer Science is the second class after Pre-AP Computer Science that together teach the fundamentals of object-oriented programming and

More information

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics Zarqa University Faculty: Information Technology Department: Computer Science Course title: Programming LAB 1 (1501111) Instructor: Lecture s time: Semester: Office Hours: Course description: This introductory

More information

CENTRAL TEXAS COLLEGE COSC 1315 INTRODUCTION TO COMPUTER PROGRAMMING. Semester Hours Credit: 3 INSTRUCTOR: OFFICE HOURS:

CENTRAL TEXAS COLLEGE COSC 1315 INTRODUCTION TO COMPUTER PROGRAMMING. Semester Hours Credit: 3 INSTRUCTOR: OFFICE HOURS: CENTRAL TEXAS COLLEGE COSC 1315 INTRODUCTION TO COMPUTER PROGRAMMING Semester Hours Credit: 3 INSTRUCTOR: OFFICE HOURS: I. INTRODUCTION A. This course presents an introduction to computer programming for

More information

CO Java SE 8: Fundamentals

CO Java SE 8: Fundamentals CO-83527 Java SE 8: Fundamentals Summary Duration 5 Days Audience Application Developer, Developer, Project Manager, Systems Administrator, Technical Administrator, Technical Consultant and Web Administrator

More information

AP Computer Science A

AP Computer Science A AP Computer Science A Couse Information: Couse Title: AP Computer Science A Couse Number: 8317 Length of Course: Full year No. of Credits: 1.0 Instructor Information: Instructor: Michael George Email:

More information

Control Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003

Control Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003 Control Flow COMS W1007 Introduction to Computer Science Christopher Conway 3 June 2003 Overflow from Last Time: Why Types? Assembly code is typeless. You can take any 32 bits in memory, say this is an

More information

1. BASICS OF PYTHON. JHU Physics & Astronomy Python Workshop Lecturer: Mubdi Rahman

1. BASICS OF PYTHON. JHU Physics & Astronomy Python Workshop Lecturer: Mubdi Rahman 1. BASICS OF PYTHON JHU Physics & Astronomy Python Workshop 2017 Lecturer: Mubdi Rahman HOW IS THIS WORKSHOP GOING TO WORK? We will be going over all the basics you need to get started and get productive

More information

Computer Programming IA

Computer Programming IA EXAM INFORMATION Items 42 Points 51 Prerequisites NONE Course Length ONE SEMESTER DESCRIPTION introduces students to the fundamentals of computer programming. Students will learn to design, code, and test

More information

CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output

CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Spring 2011 Python Python was developed

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp... 1 of 8 8/27/2014 2:15 PM Units: Teacher: ProgIIIAPCompSci, CORE Course: ProgIIIAPCompSci Year: 2012-13 Computer Systems This unit provides an introduction to the field of computer science, and covers the

More information

Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013

Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 Reviewing for the Midterm Covers chapters 1 to 5, 7 to 9 Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 2 Things to Review Review the Class Slides: Key Things to Take Away Do you understand

More information

COURSE OF STUDY UNIT PLANNING GUIDE COMPUTER SCIENCE 1 FOR: 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN

COURSE OF STUDY UNIT PLANNING GUIDE COMPUTER SCIENCE 1 FOR: 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN COURSE OF STUDY UNIT PLANNING GUIDE FOR: COMPUTER SCIENCE 1 5 CREDITS GRADE LEVEL: 9-12 FULL-YEAR COURSE PREPARED BY: SUSIE EISEN SHANNON WARNOCK, SUPERVISOR OF MATHEMATICS AND SCIENCE JULY 2017 DUMONT

More information

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: Numeric Types There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: 1-123 +456 2. Long integers, of unlimited

More information

Welcome to CS61A! Last modified: Thu Jan 23 03:58: CS61A: Lecture #1 1

Welcome to CS61A! Last modified: Thu Jan 23 03:58: CS61A: Lecture #1 1 Welcome to CS61A! This is a course about programming, which is the art and science of constructing artifacts ( programs ) that perform computations or interact with the physical world. To do this, we have

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

Senthil Kumaran S

Senthil Kumaran S Senthil Kumaran S http://www.stylesen.org/ Agenda History Basics Control Flow Functions Modules History What is Python? Python is a general purpose, object-oriented, high level, interpreted language Created

More information

Scientific Computing: Lecture 1

Scientific Computing: Lecture 1 Scientific Computing: Lecture 1 Introduction to course, syllabus, software Getting started Enthought Canopy, TextWrangler editor, python environment, ipython, unix shell Data structures in Python Integers,

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl... Page 1 of 13 Units: - All - Teacher: ProgIIIJavaI, CORE Course: ProgIIIJavaI Year: 2012-13 Intro to Java How is data stored by a computer system? What does a compiler do? What are the advantages of using

More information

CVEN 302. Computer Applications in Engineering and Construction. Dr. Tony Cahill Environmental and Water Resources Division

CVEN 302. Computer Applications in Engineering and Construction. Dr. Tony Cahill Environmental and Water Resources Division CVEN 302 Computer Applications in Engineering and Construction Dr. Tony Cahill Environmental and Water Resources Division Instructors Instructor: Tony Cahill Office: WERC 205J Office Hours: T/R 3:00 4:00PM.

More information

Unit E Step-by-Step: Programming with Python

Unit E Step-by-Step: Programming with Python Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator

More information

LISTS WITH PYTHON. José M. Garrido Department of Computer Science. May College of Computing and Software Engineering Kennesaw State University

LISTS WITH PYTHON. José M. Garrido Department of Computer Science. May College of Computing and Software Engineering Kennesaw State University LISTS WITH PYTHON José M. Garrido Department of Computer Science May 2015 College of Computing and Software Engineering Kennesaw State University c 2015, J. M. Garrido Lists with Python 2 Lists with Python

More information

Midterm 1 Review. Important control structures. Important things to review. Functions Loops Conditionals

Midterm 1 Review. Important control structures. Important things to review. Functions Loops Conditionals Midterm 1 Review Important control structures Functions Loops Conditionals Important things to review Binary numbers Boolean operators (and, or, not) String operations: len, ord, +, *, slice, index List

More information

STUDENT LESSON A12 Iterations

STUDENT LESSON A12 Iterations STUDENT LESSON A12 Iterations Java Curriculum for AP Computer Science, Student Lesson A12 1 STUDENT LESSON A12 Iterations INTRODUCTION: Solving problems on a computer very often requires a repetition of

More information

Numerical Methods. Centre for Mathematical Sciences Lund University. Spring 2015

Numerical Methods. Centre for Mathematical Sciences Lund University. Spring 2015 Numerical Methods Claus Führer Alexandros Sopasakis Centre for Mathematical Sciences Lund University Spring 2015 Preface These notes serve as a skeleton for the course. They document together with the

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu/program/philippines-summer-2012/ Philippines Summer 2012 Lecture 1 Introduction to Python June 19, 2012 Agenda About the Course What is

More information

COP 1170 Introduction to Computer Programming using Visual Basic

COP 1170 Introduction to Computer Programming using Visual Basic Course Justification This course is the first computer programming course in the Computer Information Systems Associate in Arts degree program; is required in the Computer Programming and Analysis, Database

More information

Contents. Lezione 3. Reference sources. Contents

Contents. Lezione 3. Reference sources. Contents Contents Lezione 3 Introduzione alla programmazione con Python Mauro Ceccanti and Alberto Paoluzzi Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza, escape

More information

Student Number: Comments are not required except where indicated, although they may help us mark your answers.

Student Number: Comments are not required except where indicated, although they may help us mark your answers. CSC 108H5 F 2018 Midterm Test Duration 90 minutes Aids allowed: none Student Number: utorid: Last Name: First Name: Do not turn this page until you have received the signal to start. (Please fill out the

More information

Review for the Final Exam CS 8: Introduction to Computer Science, Winter 2018 Lecture #15

Review for the Final Exam CS 8: Introduction to Computer Science, Winter 2018 Lecture #15 Review for the Final Exam CS 8: Introduction to Computer Science, Winter 2018 Lecture #15 Ziad Matni Dept. of Computer Science, UCSB Administrative Project #2 is DUE on FRIDAY no late submissions accepted

More information

Consolidation and Review

Consolidation and Review Consolidation and Review Professor Hugh C. Lauer CS-1004 Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction to Computer Science, 2 nd edition,

More information

CS1 Lecture 5 Jan. 25, 2019

CS1 Lecture 5 Jan. 25, 2019 CS1 Lecture 5 Jan. 25, 2019 HW1 due Monday, 9:00am. Notes: Do not write all the code at once before starting to test. Take tiny steps. Write a few lines test... add a line or two test... add another line

More information

Functions and Decomposition

Functions and Decomposition Unit 4 Functions and Decomposition Learning Outcomes Design and implement functions to carry out a particular task. Begin to evaluate when it is necessary to split some work into functions. Locate the

More information

CS111: PROGRAMMING LANGUAGE II

CS111: PROGRAMMING LANGUAGE II 1 CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 1: Introduction Lecture Contents 2 Course info Why programming?? Why Java?? Write once, run anywhere!! Java basics Input/output Variables

More information