Python for Bioinformatics Fall 2014

Size: px
Start display at page:

Download "Python for Bioinformatics Fall 2014"

Transcription

1 Python for Bioinformatics Fall 2014 Ntino Krampis, PhD Associate Professor Biological Sciences Class

2 Course Structure Meets weekly on Tuesdays 2-4pm Office hours on Mondays 10am - 12pm, will not answer anymore. Weekly homework due on day of class Will follow textbook as close as possible Homework is writing computer code for data data analysis: work in computer lab or your PC 2

3 Syllabus (Detailed syllabus on the Blackboard) : Introduction to Programming and first steps with Data Types in Python : Programming: More Data Types & Flow Control, : Basic Programming: Advanced Data Types & Flow Control : Bioinformatics: Parsing Files & Regular Expressions 3

4 Bioinformatics Joint field of Biology and Computer Science Use computer code for analysis of -omics datasets Interested in doing research in Bioinformatics: get a good grade in the class and join my lab 4

5 Computer Algorithms & Code Difference between an algorithm and code This is an algorithm 5

6 Computer Algorithms & Code This is computer code Computer code is instructions in computer language, on how to execute the steps of the algorithm. 6

7 Computer Algorithms & Code This is a bioinformatic algorithm and code 7

8 Computer Code in Python Python is a scripting language, code is called scripts Scripts are interpreted, line by line by the Python interpreter The interpreter can be interactive (good for learning or testing code) Or can run programs in batch, reading the code from a file (we will do this for homework) 8

9 The Python Interpreter Open the terminal in your Mac computer Either by clicking the icon on the dock Or by hitting cmd+space and search for terminal: 9

10 Python Variables: Strings Ntinos-MacBook-Pro:~ krampis$ python Python (default, Mar , 22:15:05) [GCC Compatible Apple LLVM 5.0 (clang )] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print("hello World") Hello World >>> message = "Hello World" >>> print(message) Hello World >>> message = input() "Hello World >>> print(message) Hello World >>> greeting = "your message to the world?" >>> message = input(greeting) your message to the world? "Hello World" >>> print message Hello World 10

11 Python Variables: Integers >>> integer = 2 >>> print(integer) 2 >>> google = 2 >>> print(google) 2 >>> yahoo = "2" >>> print(yahoo) 2 >>> google / 2 1 >>> yahoo / 2 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for /: 'str' and int' >>> google**2 4 >>> string**2???? 11

12 String Quotations & Functions >>> dna = "ACGT" >>> print dna ACGT >>> dna = 'ACGT' >>> print dna ACGT >>> dna = "'ACGT'" >>> print dna ACGT >>> dna = " 'ACGT' ACGT >>> dna = ''' 'ACGT' 'ACGT' ''' >>> dna = 'ACGT' >>> dna.lower() acgt' >>> dna = 'ACgt' >>> dna.upper() ACGT >>> 2.upper()??? String quotes need to match on both sides Functions as built in to Python, and operate on specific data types 12

13 String Quotations & Functions >>> "ACGT".replace( 'A', 'T') TCGT' >>> "'ACGT'".replace( 'A', 'T') TCGT'" >>> import math >>> math.sqrt(2) >>> math.sqrt( 2 )??? >>> "Hello my name is Ntino".split() ['Hello', 'my', 'name', 'is', Ntino ] >>> name = Hello my name is Ntino >>> name.split() ['Hello', 'my', 'name', 'is', 'Ntino'] >>> "Hello, my name is, Ntino".split(',') ['Hello', ' my name is', ' Ntino ] >>> "Hello my name is Ntino".split(',') ['Hello my name is Ntino'] 13

14 String Quotations & Functions Python language reference, section

15 List Variables: >>> "Hello my name is Ntino".split() ['Hello', 'my', 'name', 'is', Ntino ] >>> list = [1, two",3,4,"last"] >>> nested_list = ["a string", list, 0] >>> print nested_list ['a string', [1, 'two', 3, 4, 'last'], 0] >>> nested_nest_list = ["a string", nested_list, 0, list] >>> print(nested_nest_list) ['a string', ['a string', [1, 'two', 3, 4, 'last'], 0], 0, [1, 'two', 3, 4, last']] >>> nested_nest_list = [] >>> print(nested_nest_list) [] 15

16 Operations with List Variables: >>> nucleic = ['A', 'C', 'G', T'] >>> nucleic[1] 'C' >>> nucleic[0] A' >>> nucleic[4] = 'U' Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list assignment index out of range >>> nucleic.append('u') >>> print(nucleic) ['A', 'C', 'G', 'T', U'] >>> nucleic.pop() 'U' >>> print(nucleic) ['A', 'C', 'G', T'] >>> nucleic.append([1,2,3]) >>> print(nucleic) ['A', 'C', 'G', 'T', [1, 2, 3]] 16

17 Operations with List Variables: >>> print(nucleic) ['A', 'C', 'G', 'T', [1, 2, 3]] >>> nucleic[0:2] ['A', C'] >>> nucleic[0:3] ['A', 'C', G'] >>> nucleic[-1] [1, 2, 3] >>> nucleic.index('t') 3 >>> nucleic.index([1, 2, 3]) 4 17

18 Read Chapters 1(quick), Chapt. 2 up to 3.5 (critical) Do homework, due by next class 18

Python Programming Exercises 1

Python Programming Exercises 1 Python Programming Exercises 1 Notes: throughout these exercises >>> preceeds code that should be typed directly into the Python interpreter. To get the most out of these exercises, don t just follow them

More information

CS 1110, LAB 1: EXPRESSIONS AND ASSIGNMENTS First Name: Last Name: NetID:

CS 1110, LAB 1: EXPRESSIONS AND ASSIGNMENTS   First Name: Last Name: NetID: CS 1110, LAB 1: EXPRESSIONS AND ASSIGNMENTS http://www.cs.cornell.edu/courses/cs1110/2018sp/labs/lab01/lab01.pdf First Name: Last Name: NetID: Learning goals: (1) get hands-on experience using Python in

More information

Python 1: Introduction to Python 1 / 19

Python 1: Introduction to Python 1 / 19 Python 1: Introduction to Python 1 / 19 Python Python is one of many scripting languages. Others include Perl, Ruby, and even the Bash/Shell programming we've been talking about. It is a script because

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

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

Introduction to Python

Introduction to Python Introduction to Python CB2-101 Introduction to Scientific Computing November 11 th, 2014 Emidio Capriotti http://biofold.org/emidio Division of Informatics Department of Pathology Python Python high-level

More information

Act like a code monkey Coding Basics

Act like a code monkey Coding Basics Act like a code monkey Coding Basics Announcement Homework 1 grade is posted If you believe there is an error in grading (assignments or quizzes), you may request a regrading within one week of receiving

More information

Fundamentals of Programming (Python) Getting Started with Programming

Fundamentals of Programming (Python) Getting Started with Programming Fundamentals of Programming (Python) Getting Started with Programming Ali Taheri Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

Getting Started with Python

Getting Started with Python Fundamentals of Programming (Python) Getting Started with Python Sina Sajadmanesh Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

A Little Python Part 1. Introducing Programming with Python

A Little Python Part 1. Introducing Programming with Python A Little Python Part 1 Introducing Programming with Python Preface Not a complete course in a programming language Many details can t be covered Need to learn as you go My programming style is not considered

More information

MEIN 50010: Python Strings

MEIN 50010: Python Strings : Python Strings Fabian Sievers Higgins Lab, Conway Institute University College Dublin Wednesday, 2017-10-25 Lecture Basic string manipulation Converting between different variable types strings Command-line

More information

Getting Started Values, Expressions, and Statements CS GMU

Getting Started Values, Expressions, and Statements CS GMU Getting Started Values, Expressions, and Statements CS 112 @ GMU Topics where does code go? values and expressions variables and assignment 2 where does code go? we can use the interactive Python interpreter

More information

Science One CS : Getting Started

Science One CS : Getting Started Science One CS 2018-2019: Getting Started Note: if you are having trouble with any of the steps here, do not panic! Ask on Piazza! We will resolve them this Friday when we meet from 10am-noon. You can

More information

Lecture 4: Basic I/O

Lecture 4: Basic I/O Lecture 4: Basic I/O CS1068+ Introductory Programming in Python Dr Kieran T. Herley Department of Computer Science University College Cork 2017-2018 KH (21/09/17) Lecture 4: Basic I/O 2017-2018 1 / 20

More information

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

In this course, you need to use Pearson etext. Go to Pearson etext and Video Notes. **Disclaimer** This syllabus is to be used as a guideline only. The information provided is a summary of topics to be covered in the class. Information contained in this document such as assignments, grading

More information

MEIN 50010: Python Introduction

MEIN 50010: Python Introduction : Python Fabian Sievers Higgins Lab, Conway Institute University College Dublin Wednesday, 2017-10-04 Outline Goals Teach basic programming concepts Apply these concepts using Python Use Python Packages

More information

Starting. Read: Chapter 1, Appendix B from textbook.

Starting. Read: Chapter 1, Appendix B from textbook. Read: Chapter 1, Appendix B from textbook. Starting There are two ways to run your Python program using the interpreter 1 : from the command line or by using IDLE (which also comes with a text editor;

More information

61A Lecture 2. Friday, August 28, 2015

61A Lecture 2. Friday, August 28, 2015 61A Lecture 2 Friday, August 28, 2015 Names, Assignment, and User-Defined Functions (Demo) Types of Expressions Primitive expressions: 2 add 'hello' Number or Numeral Name String Call expressions: max

More information

Physics 514 Basic Python Intro

Physics 514 Basic Python Intro Physics 514 Basic Python Intro Emanuel Gull September 8, 2014 1 Python Introduction Download and install python. On Linux this will be done with apt-get, evince, portage, yast, or any other package manager.

More information

Introductory Linux Course. Python I. Pavlin Mitev UPPMAX. Author: Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University

Introductory Linux Course. Python I. Pavlin Mitev UPPMAX. Author: Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University Introductory Linux Course Python I Pavlin Mitev UPPMAX Author: Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University August, 2017 Outline Python introduction Python basics get started with

More information

Lecture 4. Defining Functions

Lecture 4. Defining Functions Lecture 4 Defining Functions Academic Integrity Quiz Reading quiz about the course AI policy Go to http://www.cs.cornell.edu/courses/cs11110/ Click Academic Integrity in side bar Read and take quiz in

More information

Lab 1: Course Intro, Getting Started with Python IDLE. Ling 1330/2330 Computational Linguistics Na-Rae Han

Lab 1: Course Intro, Getting Started with Python IDLE. Ling 1330/2330 Computational Linguistics Na-Rae Han Lab 1: Course Intro, Getting Started with Python IDLE Ling 1330/2330 Computational Linguistics Na-Rae Han Objectives Course Introduction http://www.pitt.edu/~naraehan/ling1330/index.html Student survey

More information

Lecture 3: Functions & Modules

Lecture 3: Functions & Modules http://www.cs.cornell.edu/courses/cs1110/2018sp Lecture 3: Functions & Modules (Sections 3.1-3.3) CS 1110 Introduction to Computing Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner,

More information

Not-So-Mini-Lecture 6. Modules & Scripts

Not-So-Mini-Lecture 6. Modules & Scripts Not-So-Mini-Lecture 6 Modules & Scripts Interactive Shell vs. Modules Launch in command line Type each line separately Python executes as you type Write in a code editor We use Atom Editor But anything

More information

CS 3813/718 Fall Python Programming. Professor Liang Huang.

CS 3813/718 Fall Python Programming. Professor Liang Huang. CS 3813/718 Fall 2012 Python Programming Professor Liang Huang huang@cs.qc.cuny.edu http://vision.cs.qc.cuny.edu/huang/python-2012f/ Logistics Lectures: TTh 9:25-10:40 am SB B-141 Personnel Instructor

More information

Strings. Genome 373 Genomic Informatics Elhanan Borenstein

Strings. Genome 373 Genomic Informatics Elhanan Borenstein Strings Genome 373 Genomic Informatics Elhanan Borenstein print hello, world pi = 3.14159 pi = -7.2 yet_another_var = pi + 10 print pi import math log10 = math.log(10) import sys arg1 = sys.argv[1] arg2

More information

Objectives. Structure. Munster Programming Training

Objectives. Structure. Munster Programming Training 1 Munster Programming Training Objectives 1. To give a short and basic introduction to computer programming, web design, web animation and video production. 2. To foster interest in computers by encouraging

More information

Python language: Basics

Python language: Basics Python language: Basics The FOSSEE Group Department of Aerospace Engineering IIT Bombay Mumbai, India FOSSEE Team (FOSSEE IITB) Basic Python 1 / 45 Outline 1 Data types Numbers Booleans Strings 2 Operators

More information

CMSC 201 Spring 2017 Lab 01 Hello World

CMSC 201 Spring 2017 Lab 01 Hello World CMSC 201 Spring 2017 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 5th by 8:59:59 PM Value: 10 points At UMBC, our General Lab (GL) system is designed to grant students the

More information

>>> * *(25**0.16) *10*(25**0.16)

>>> * *(25**0.16) *10*(25**0.16) #An Interactive Session in the Python Shell. #When you type a statement in the Python Shell, #the statement is executed immediately. If the #the statement is an expression, its value is #displayed. #Lines

More information

Introduction to Python. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Introduction to Python. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas Introduction to Python Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas If you have your own PC, download and install a syntax-highlighting text editor and Python

More information

Python 1: Intro! Max Dougherty Andrew Schmitt

Python 1: Intro! Max Dougherty Andrew Schmitt Python 1: Intro! Max Dougherty Andrew Schmitt Computational Thinking Two factors of programming: The conceptual solution to a problem. Solution syntax in a programming language BJC tries to isolate and

More information

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I Lecture 1: Class Introduction DR. BO TANG ASSISTANT PROFESSOR HOFSTRA UNIVERSITY 1 9/7/16 CSC15 - Python OUTLINE What is Computer Science? What is this Class

More information

Chris Simpkins (Georgia Tech) CS 2316 Data Manipulation for Engineers Python Overview 1 / 9

Chris Simpkins (Georgia Tech) CS 2316 Data Manipulation for Engineers Python Overview 1 / 9 http://xkcd.com/353/ Chris Simpkins (Georgia Tech) CS 2316 Data Manipulation for Engineers Python Overview 1 / 9 Python Python is a general-purpose programming language, meaning you can write any kind

More information

Introductory Linux Course. Python I. Martin Dahlö UPPMAX. Author: Nina Fischer. Dept. for Cell and Molecular Biology, Uppsala University

Introductory Linux Course. Python I. Martin Dahlö UPPMAX. Author: Nina Fischer. Dept. for Cell and Molecular Biology, Uppsala University Introductory Linux Course Martin Dahlö UPPMAX Author: Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University August, 2018 Outline Python basics get started with Python Data types Control

More information

CS 3030 Scripting Languages Syllabus

CS 3030 Scripting Languages Syllabus General Information CS 3030 Scripting Languages Semester: Fall 2017 Textbook: Location: Instructor Info: None. We will use freely available resources from the Internet. Online Ted Cowan tedcowan@weber.edu

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

CMSC 201 Spring 2018 Lab 01 Hello World

CMSC 201 Spring 2018 Lab 01 Hello World CMSC 201 Spring 2018 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 4th by 8:59:59 PM Value: 10 points At UMBC, the GL system is designed to grant students the privileges

More information

Introduction to Python. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Introduction to Python. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas Introduction to Python Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas If you have your own PC, download and install a syntax-highlighting text editor and Python

More information

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

In this course, you need to use Pearson etext. Go to Pearson etext and Video Notes. **Disclaimer** This syllabus is to be used as a guideline only. The information provided is a summary of topics to be covered in the class. Information contained in this document such as assignments, grading

More information

Oliver BONHAM-CARTER. Fall 2018 Week 2

Oliver BONHAM-CARTER. Fall 2018 Week 2 About Discrete Structures: CMPSC 102 Oliver BONHAM-CARTER Fall 2018 Week 2 1 / 24 About About www.python.org Download python3 if you are using your own hardware 1 / 24 About... About Is an interpreted,

More information

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion

CSC 148 Lecture 3. Dynamic Typing, Scoping, and Namespaces. Recursion CSC 148 Lecture 3 Dynamic Typing, Scoping, and Namespaces Recursion Announcements Python Ramp Up Session Monday June 1st, 1 5pm. BA3195 This will be a more detailed introduction to the Python language

More information

Lecture 3: Functions & Modules (Sections ) CS 1110 Introduction to Computing Using Python

Lecture 3: Functions & Modules (Sections ) CS 1110 Introduction to Computing Using Python http://www.cs.cornell.edu/courses/cs1110/2019sp Lecture 3: Functions & Modules (Sections 3.1-3.3) CS 1110 Introduction to Computing Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner,

More information

STATS 507 Data Analysis in Python. Lecture 0: Introduction and Administrivia

STATS 507 Data Analysis in Python. Lecture 0: Introduction and Administrivia STATS 507 Data Analysis in Python Lecture 0: Introduction and Administrivia Data science has completely changed our world Course goals Establish a broad background in Python programming Prepare you for

More information

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2 Python for Analytics Python Fundamentals RSI Chapters 1 and 2 Learning Objectives Theory: You should be able to explain... General programming terms like source code, interpreter, compiler, object code,

More information

CS 245: Database System Principles

CS 245: Database System Principles CS 245: Database System Principles Notes 01: Introduction Peter Bailis CS 245 Notes 1 1 This course pioneered by Hector Garcia-Molina All credit due to Hector All mistakes due to Peter CS 245 Notes 1 2

More information

Python The way of a program. Srinidhi H Asst Professor Dept of CSE, MSRIT

Python The way of a program. Srinidhi H Asst Professor Dept of CSE, MSRIT Python The way of a program Srinidhi H Asst Professor Dept of CSE, MSRIT 1 Problem Solving Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution

More information

Physics 1P21/1P91. Software Registration. 1. Sapling Learning 2. FlipIt Physics 3. REEF Polling

Physics 1P21/1P91. Software Registration. 1. Sapling Learning 2. FlipIt Physics 3. REEF Polling Physics 1P21/1P91 Software Registration 1. Sapling Learning 2. FlipIt Physics 3. REEF Polling Physics 1P21/1P91 Software Registration 1. SAPLING LEARNING Registration Instructions What is Sapling Learning?

More information

CSI Lab 02. Tuesday, January 21st

CSI Lab 02. Tuesday, January 21st CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed

More information

Introduction to C. CS 2060 Week 1. Prof. Jonathan Ventura. Outline Introduction Introduction to C Homework 1 C Coding Style Wrap-up

Introduction to C. CS 2060 Week 1. Prof. Jonathan Ventura. Outline Introduction Introduction to C Homework 1 C Coding Style Wrap-up Outline Introduction Homework 1 C Coding Style Wrap-up CS 2060 Week 1 Outline Introduction Homework 1 C Coding Style Wrap-up 1 Introduction Why C? Syllabus and Course Structure 2 First C example: Hello,

More information

flatlib Documentation

flatlib Documentation flatlib Documentation Release 0.2.0 João Ventura Mar 06, 2018 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Tutorials.................................................

More information

University of Washington CSE 140 Introduction to Data Programming Winter Midterm exam. February 6, 2013

University of Washington CSE 140 Introduction to Data Programming Winter Midterm exam. February 6, 2013 University of Washington CSE 140 Introduction to Data Programming Winter 2013 Midterm exam February 6, 2013 Name: UW Net ID (username): This exam is closed book, closed notes. You have 50 minutes to complete

More information

CSCI 121: Anatomy of a Python Script

CSCI 121: Anatomy of a Python Script CSCI 121: Anatomy of a Python Script Python Scripts We start by a Python script: A text file containing lines of Python code. Each line is a Python statement. The Python interpreter (the python3 command)

More information

Course Information and Introduction

Course Information and Introduction August 22, 2017 Course Information 1 Instructors : Email : arash.rafiey@indstate.edu Office : Root Hall A-127 Office Hours : Tuesdays 11:30 pm 12:30 pm. Root Hall, A127. 2 Course Home Page : http://cs.indstate.edu/~arash/cs256.html

More information

Shell / Python Tutorial. CS279 Autumn 2017 Rishi Bedi

Shell / Python Tutorial. CS279 Autumn 2017 Rishi Bedi Shell / Python Tutorial CS279 Autumn 2017 Rishi Bedi Shell (== console, == terminal, == command prompt) You might also hear it called bash, which is the most widely used shell program macos Windows 10+

More information

Computing with Numbers Zelle - Chapter 3

Computing with Numbers Zelle - Chapter 3 Computing with Numbers Zelle - Chapter 3 Charles Severance - www.dr-chuck.com Textbook: Python Programming: An Introduction to Computer Science, John Zelle (www.si182.com) Numbers Numeric Data Types and

More information

from scratch A primer for scientists working with Next-Generation- Sequencing data Chapter 1 Text output and manipulation

from scratch A primer for scientists working with Next-Generation- Sequencing data Chapter 1 Text output and manipulation from scratch A primer for scientists working with Next-Generation- Sequencing data Chapter 1 Text output and manipulation Chapter 1: text output and manipulation In this unit you will learn how to write

More information

Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page.

Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page. CS170 Section 5 HW #3 Due Friday, March 20 at 11:59 p.m. Write and submit one Java program, Sequence.java, as described on the next page. The assignment should be submitted on the Math/CS system (from

More information

SAMS Programming A/B. Lecture #1 Introductions July 3, Mark Stehlik

SAMS Programming A/B. Lecture #1 Introductions July 3, Mark Stehlik SAMS Programming A/B Lecture #1 Introductions July 3, 2017 Mark Stehlik Outline for Today Overview of Course A Python intro to be continued in lab on Wednesday (group A) and Thursday (group B) 7/3/2017

More information

The current topic: Python. Announcements. Python. Python

The current topic: Python. Announcements. Python. Python The current topic: Python Announcements! Introduction! reasons for studying languages! language classifications! simple syntax specification Object-oriented programming: Python Types and values Syntax

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

ESET 349 Microcontroller Architecture, Fall 2018

ESET 349 Microcontroller Architecture, Fall 2018 ESET 349 Microcontroller Architecture, Fall 2018 Syllabus Contact Information: Professor: Dr. Byul Hur Office: 008 Fermier Telephone: (979) 845-5195 FAX: E-mail: byulmail@tamu.edu Web: rftestgroup.tamu.edu

More information

Introduction to Bioinformatics

Introduction to Bioinformatics Introduction to Bioinformatics Variables, Data Types, Data Structures, Control Structures Janyl Jumadinova February 3, 2016 Data Type Data types are the basic unit of information storage. Instances of

More information

Introductory Linux Course. Python I. Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University

Introductory Linux Course. Python I. Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University Introductory Linux Course Python I Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University nina.fischer@icm.uu.se January 12, 2017 Outline q Python introducjon q Python basics get started

More information

Introductory Linux Course. Python I. Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University

Introductory Linux Course. Python I. Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University Introductory Linux Course Python I Nina Fischer Dept. for Cell and Molecular Biology, Uppsala University nina.fischer@icm.uu.se August 26, 2016 Outline q Python introducjon q Python basics get started

More information

Programming for Engineers in Python. Recitation 1

Programming for Engineers in Python. Recitation 1 Programming for Engineers in Python Recitation 1 Plan Administration: Course site Homework submission guidelines Working environment Python: Variables Editor vs. shell Homework 0 Python Cont. Conditional

More information

Genome 373: Intro to Python II. Doug Fowler

Genome 373: Intro to Python II. Doug Fowler Genome 373: Intro to Python II Doug Fowler Review string objects represent a sequence of characters characters in strings can be gotten by index, e.g. mystr[3] substrings can be extracted by slicing, e.g.

More information

Introduction, Programming, Python. Michael Mandel Lecture 1 Methods in Computational Linguistics I The City University of New York, Graduate Center

Introduction, Programming, Python. Michael Mandel Lecture 1 Methods in Computational Linguistics I The City University of New York, Graduate Center Introduction, Programming, Python Michael Mandel Lecture 1 Methods in Computational Linguistics I The City University of New York, Graduate Center Outline Class Information Introduction to Computer Science

More information

CS1 Lecture 3 Jan. 18, 2019

CS1 Lecture 3 Jan. 18, 2019 CS1 Lecture 3 Jan. 18, 2019 Office hours for Prof. Cremer and for TAs have been posted. Locations will change check class website regularly First homework assignment will be available Monday evening, due

More information

6.S189 Homework 1. What to turn in. Exercise 1.1 Installing Python. Exercise 1.2 Hello, world!

6.S189 Homework 1. What to turn in. Exercise 1.1 Installing Python. Exercise 1.2 Hello, world! 6.S189 Homework 1 http://web.mit.edu/6.189/www/materials.html What to turn in Do the warm-up problems for Days 1 & 2 on the online tutor. Complete the problems below on your computer and get a checkoff

More information

CMPT 120 Basics of Python. Summer 2012 Instructor: Hassan Khosravi

CMPT 120 Basics of Python. Summer 2012 Instructor: Hassan Khosravi CMPT 120 Basics of Python Summer 2012 Instructor: Hassan Khosravi Python A simple programming language to implement your ideas Design philosophy emphasizes code readability Implementation of Python was

More information

Geophysics 501. Computa3onal Methods for the Geosciences. Flow Control and Lists. Zach Zens

Geophysics 501. Computa3onal Methods for the Geosciences. Flow Control and Lists. Zach Zens Geophysics 501 Computa3onal Methods for the Geosciences Flow Control and Lists Zach Zens Shell versions Thompson shell sh Bourne shell Bourne again shell - BASH TCSH Korn Shell - KSH Z Shell - ZSH Shell

More information

CSC326 Python Imperative Core (Lec 2)

CSC326 Python Imperative Core (Lec 2) i CSC326 Python Imperative Core (Lec ii REVISION HISTORY NUMBER DATE DESCRIPTION NAME 1.0 2011-09 JZ iii Contents 1 Agenda 1 2 Invoking Python 1 3 Value, Type, Variable 1 4 Keywords 2 5 Statement 2 6 Expression

More information

CS 1110, LAB 2: ASSIGNMENTS AND STRINGS

CS 1110, LAB 2: ASSIGNMENTS AND STRINGS CS 1110, LAB 2: ASSIGNMENTS AND STRINGS http://www.cs.cornell.edu/courses/cs1110/2014fa/labs/lab02.pdf First Name: Last Name: NetID: The purpose of this lab is to get you comfortable with using assignment

More information

COMP1730/COMP6730 Programming for Scientists. Data: Values, types and expressions.

COMP1730/COMP6730 Programming for Scientists. Data: Values, types and expressions. COMP1730/COMP6730 Programming for Scientists Data: Values, types and expressions. Lecture outline * Data and data types. * Expressions: computing values. * Variables: remembering values. What is data?

More information

Introduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science

Introduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science Introduction to Computer Programming for Non-Majors CSC 2301, Fall 2015 The Department of Computer Science CSC 2301 Welcome to Class CSC 2301! Introduction to Computer Programming for Non-Majors Who are

More information

Python Tutorial. Day 1

Python Tutorial. Day 1 Python Tutorial Day 1 1 Why Python high level language interpreted and interactive real data structures (structures, objects) object oriented all the way down rich library support 2 The First Program #!/usr/bin/env

More information

Practical Programming, 2nd Edition

Practical Programming, 2nd Edition Extracted from: Practical Programming, 2nd Edition An Introduction to Computer Science Using Python 3 This PDF file contains pages extracted from Practical Programming, 2nd Edition, published by the Pragmatic

More information

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen CSCI 136 Data Structures & Advanced Programming Fall 2018 Instructors Bill Lenhart & Bill Jannen Administrative Details Class roster: Who s here? And who s trying to get in? Handout: Class syllabus Lecture

More information

1. Textbook #1: Our Digital World (ODW). 2. Textbook #2: Guidelines for Office 2013 (GFO). 3. SNAP: Assessment Software

1. Textbook #1: Our Digital World (ODW). 2. Textbook #2: Guidelines for Office 2013 (GFO). 3. SNAP: Assessment Software CIS - Survey of Computer Information Systems SPRING 014-16-Week Course Professor: JON P. RAGER Weekly Schedule Note: This schedule is subjected to BE CHANGED at your instructor's discretion. Please check

More information

Introduction to Python

Introduction to Python Introduction to Python Why is Python? Object-oriented Free (open source) Portable Powerful Mixable Easy to use Easy to learn Running Python Immediate mode Script mode Integrated Development Environment

More information

W13:Homework:H08. CS40 Foundations of Computer Science W13. From 40wiki

W13:Homework:H08. CS40 Foundations of Computer Science W13. From 40wiki W13:Homework:H08 From 40wiki CS40 Foundations of Computer Science W13 W13:Exams W13:Homework in Class and Web Work W13:Calendar W13:Syllabus and Lecture Notes UCSB-CS40-W13 on Facebook (https://www.facebook.com/groups/ucsb.cs40.w13/)

More information

University of Washington CSE 140 Introduction to Data Programming Winter Midterm exam. February 6, 2013

University of Washington CSE 140 Introduction to Data Programming Winter Midterm exam. February 6, 2013 University of Washington CSE 140 Introduction to Data Programming Winter 2013 Midterm exam February 6, 2013 Name: Solutions UW Net ID (username): This exam is closed book, closed notes. You have 50 minutes

More information

COMP 204: Sets, Commenting & Exceptions

COMP 204: Sets, Commenting & Exceptions COMP 204: Sets, Commenting & Exceptions Material from Carlos G. Oliver, Christopher J.F. Cameron October 12, 2018 1/31 Reminder CSUS is holding a midterm review session on Monday, October 15th, from 6-9pm.

More information

1. Textbook #1: Our Digital World (ODW). 2. Textbook #2: Guidelines for Office 2013 (GFO). 3. SNAP: Assessment Software

1. Textbook #1: Our Digital World (ODW). 2. Textbook #2: Guidelines for Office 2013 (GFO). 3. SNAP: Assessment Software CIS - Survey of Computer Information Systems FALL 014-16-Week Course Professor: JON P. RAGER Weekly Schedule Note: This schedule is subjected to BE CHANGED at your instructor's discretion. Please check

More information

Programming for Engineers in Python. Autumn

Programming for Engineers in Python. Autumn Programming for Engineers in Python Autumn 2011-12 Plan Administration: Course site Homework submission guidelines Working environment Python: Variables Editor vs. shell Homework 0 Python Cont. Conditional

More information

CSE : Python Programming. Homework 5 and Projects. Announcements. Course project: Overview. Course Project: Grading criteria

CSE : Python Programming. Homework 5 and Projects. Announcements. Course project: Overview. Course Project: Grading criteria CSE 399-004: Python Programming Lecture 5: Course project and Exceptions February 12, 2007 Announcements Still working on grading Homeworks 3 and 4 (and 2 ) Homework 5 will be out by tomorrow morning I

More information

CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28) First Name: Last Name: NetID:

CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28)   First Name: Last Name: NetID: CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28) http://www.cs.cornell.edu/courses/cs1110/2016sp/labs/lab01/lab01.pdf First Name: Last Name: NetID: Goals. Learning a computer language is a lot like learning

More information

Lecture 6: Specifications & Testing

Lecture 6: Specifications & Testing http://www.cs.cornell.edu/courses/cs1110/2018sp Lecture 6: Specifications & Testing (Sections 4.9, 9.5) CS 1110 Introduction to Computing Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner,

More information

CSE 111 Bio: Program Design I Lecture 3: Python Basics & More Bio

CSE 111 Bio: Program Design I Lecture 3: Python Basics & More Bio Theresa McCracken @McHumor.com CSE 111 Bio: Program Design I Lecture 3: Python Basics & More Bio Robert Sloan (CS) & Rachel Poretsky (Bio) University of Illinois, Chicago August 31, 2017 DNA sequencing

More information

Programming Fundamentals and Python

Programming Fundamentals and Python Chapter 2 Programming Fundamentals and Python This chapter provides a non-technical overview of Python and will cover the basic programming knowledge needed for the rest of the chapters in Part 1. It contains

More information

The >>> is a Python prompt indicating that Python is ready for us to give it a command. These commands are called statements.

The >>> is a Python prompt indicating that Python is ready for us to give it a command. These commands are called statements. When you start Python, you will see something like: Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.

More information

CS1 Lecture 3 Jan. 22, 2018

CS1 Lecture 3 Jan. 22, 2018 CS1 Lecture 3 Jan. 22, 2018 Office hours for me and for TAs have been posted, locations will change check class website regularly First homework available, due Mon., 9:00am. Discussion sections tomorrow

More information

Python for Finance. Introduction and Basics of Python. Andras Niedermayer

Python for Finance. Introduction and Basics of Python. Andras Niedermayer Python for Finance Introduction and Basics of Python Andras Niedermayer Outline 1 Introduction 2 Why Python? 3 Python installation and environments 4 First Steps in Python 5 Variables 6 Basic Operations

More information

Algorithms for Bioinformatics

Algorithms for Bioinformatics These slides are based on previous years slides of Alexandru Tomescu, Leena Salmela and Veli Mäkinen 582670 Algorithms for Bioinformatics Lecture 1: Primer to algorithms and molecular biology 2.9.2014

More information

Introduction to Computer Programming for Non-Majors

Introduction to Computer Programming for Non-Majors Introduction to Computer Programming for Non-Majors CSC 2301, Fall 2016 Chapter 1 Instructor: Long Ma The Department of Computer Science Objectives To understand the respective roles of hardware and software

More information

Python is available at: https://www.python.org/ Why Python is awesome: https://www.python.org/about/success/

Python is available at: https://www.python.org/ Why Python is awesome: https://www.python.org/about/success/ The Python IDLE: Introduction This tutorial assumes you have a PYTHON 3 version of the programming language installed. (Current version at of this writing is Python 3.6) Python is available at: https://www.python.org/

More information

Lessons on Python Numbers

Lessons on Python Numbers Lessons on Python Numbers Walter Didimo [ 30 minutes ] Types of numbers There are only three kinds of number in Python: integer any integer number floating-point any real number complex any number having

More information

Computer Lab 1: Introduction to Python

Computer Lab 1: Introduction to Python Computer Lab 1: Introduction to Python 1 I. Introduction Python is a programming language that is fairly easy to use. We will use Python for a few computer labs, beginning with this 9irst introduction.

More information

Python for Non-programmers

Python for Non-programmers Python for Non-programmers A Gentle Introduction 1 Yann Tambouret Scientific Computing and Visualization Information Services & Technology Boston University 111 Cummington St. yannpaul@bu.edu Winter 2013

More information