You Need an Interpreter! Comp Spring /28/08 L10 - An Interpreter

Size: px
Start display at page:

Download "You Need an Interpreter! Comp Spring /28/08 L10 - An Interpreter"

Transcription

1 You Need an Interpreter!

2 Closing the GAP Thus far, we ve been struggling to speak to computers in their language, maybe its time we spoke to them in ours How high can we rasie the level of discourse? We ll enlist the aid of an interpreter An interpreted language uses the computer to do all the hard work of figuring out what is meant by a statement. It figures out what instructions to execute, where variables are stored, and how best to accomplish the goals of the program given a high-level specification

3 A Quick Class Exercise Download Python 2.5 ( Most of you will click on the Windows Installer Select the defaults and install on your machine Now choose Python (command line) from your start menu

4 Getting Started Type the following commands at the >>> prompt After entering a couple of commands, try using the up-arrow key to bring back an old command

5 Feeling Loopy? Let s write a simple loop to repeat a command several times Enter a tab to set off the body of the loop, which is the part that gets repeated. Type a return at the end of the body.

6 One More For You A second type of loop specifies a range of values for a variable to take on Why did it just go to 9?

7 What s in a Range A Range generates a list of values to set a variable to. Three versions range(whilelessthan) # starts at 0 range(first, whilelessthan) range(first, whilelessthan, step)

8 Or Make your own List A for loop will replace the variable with the items from any user-specified list Lists can hold numbers, strings, or variables

9 No Strings Attached Variables can be set to a sequence of characters called strings Python provides many ways of processing strings Strings can be indexed x[0] to access characters (the first character is 0) Strings can be sliced x[2:7] to get a range of characters

10 You ve seen range() Loops with Strings Another built in function is len()

11 A Function Let s try some simple user-defined functions Two levels of indention. One for the body of the function, another for the subbody of the for loop Functions can call other functions

12 More Math By default, integer arithmetic is used on integers (might lead to unexpected results) More functions

13 More Lists Lists are very flexible variable types Can be indexed and sliced like strings Also, sorted, modified, shortened, an enlarged

14 Conditionals if/then/else allow statements to be executed conditionally Can use and and or to combine conditions

15 From Statements to a Program Thus far, we ve written small functions and entered simple statements into the python interpreter. At this point we ll store a list of statements in a file to create a program. Steps Create a list of statements in a file with the filename extension.py using a text editor Run the program one of 2 ways 1) Type python programname.py 2) Double click on the file

16 A Simple Text Editor Python provides a simple text editor called Idle Operating system also provides a simple editor (Windows XP: Notepad, Mac OSX: TextEdit) Idle + Python Aware, and thus tries to help you with your program - It does not conform to user-interface standards

17 Creating a File 1) On the File Menu Choose New Window 2) Type in the simple function and the following for loop Notice how Idle automatically highlights keywords 3) When finished save the file as HexDigits.py

18 Running the Program 1) On the Run Menu Choose Run Module or just press F5 2) The program should run in the shell window 3) You can also run it by double-clicking on the file in an explorer window

19 Getting User Input We used a new built in function at the end of this program called raw_input() raw_input( prompt string ) prints the prompt and then reads an input string from the user In our example we ignored the input string, but we could have saved it in a variable. Ex. x = raw_input( What is your name? ) This will allow us to write more interesting programs that interact with us

20 A Simple Game Let s use what we ve learned so far to write a simple number guessing game Save as YouGuess.py Run using F5

21 The Reverse Here s the game in reverse, where the computer tries to guess your number

22 A Useful Utility A simple program to count the number of lines, words, and characters in a text file Importing sys and string libraries String.split(control) splits a string into a list separated by characters from the control string. If no control string is specified, the string string.whitespace from the string library is used.

23 Next Time Now that we can write a script or program by saving our statements in a file We ll explore more Python We ll use Python to explore our computer Composing and importing scripts

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

More information

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

More information

Flow Control: Branches and loops

Flow Control: Branches and loops Flow Control: Branches and loops In this context flow control refers to controlling the flow of the execution of your program that is, which instructions will get carried out and in what order. In the

More information

Molecular Statistics Exercise 1. As was shown to you this morning, the interactive python shell can add, subtract, multiply and divide numbers.

Molecular Statistics Exercise 1. As was shown to you this morning, the interactive python shell can add, subtract, multiply and divide numbers. Molecular Statistics Exercise 1 Introduction This is the first exercise in the course Molecular Statistics. The exercises in this course are split in two parts. The first part of each exercise is a general

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

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

Python Input, output and variables. Lecture 23 COMPSCI111/111G SS 2018

Python Input, output and variables. Lecture 23 COMPSCI111/111G SS 2018 Python Input, output and variables Lecture 23 COMPSCI111/111G SS 2018 1 Today s lecture What is Python? Displaying text on screen using print() Variables Numbers and basic arithmetic Getting input from

More information

Intro to Python & Programming. C-START Python PD Workshop

Intro to Python & Programming. C-START Python PD Workshop Don t just buy a new video game, make one. Don t just download the latest app, help design it. Don t just play on your phone, program it. No one is born a computer scientist, but with a little hard work

More information

Basic Python 3 Programming (Theory & Practical)

Basic Python 3 Programming (Theory & Practical) Basic Python 3 Programming (Theory & Practical) Length Delivery Method : 5 Days : Instructor-led (Classroom) Course Overview This Python 3 Programming training leads the student from the basics of writing

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

An Introduction to Python

An Introduction to Python An Introduction to Python Day 2 Renaud Dessalles dessalles@ucla.edu Python s Data Structures - Lists * Lists can store lots of information. * The data doesn t have to all be the same type! (unlike many

More information

Introduction to Python (All the Basic Stuff)

Introduction to Python (All the Basic Stuff) Introduction to Python (All the Basic Stuff) 1 Learning Objectives Python program development Command line, IDEs, file editing Language fundamentals Types & variables Expressions I/O Control flow Functions

More information

Computer and Programming: Lab 1

Computer and Programming: Lab 1 01204111 Computer and Programming: Lab 1 Name ID Section Goals To get familiar with Wing IDE and learn common mistakes with programming in Python To practice using Python interactively through Python Shell

More information

Unit 7: Algorithms and Python CS 101, Fall 2018

Unit 7: Algorithms and Python CS 101, Fall 2018 Unit 7: Algorithms and Python CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Identify whether a sequence of steps is an algorithm in the strict sense. Explain

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

Semester 2, 2018: Lab 1

Semester 2, 2018: Lab 1 Semester 2, 2018: Lab 1 S2 2018 Lab 1 This lab has two parts. Part A is intended to help you familiarise yourself with the computing environment found on the CSIT lab computers which you will be using

More information

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3. Installing Notepad++

Notepad++  The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3. Installing Notepad++ Notepad++ The COMPSCI 101 Text Editor for Windows The text editor that we will be using in the Computer Science labs for creating our Python programs is called Notepad++ and is freely available for the

More information

Introduction to Python

Introduction to Python Islamic University Of Gaza Faculty of Engineering Computer Engineering Department Lab 1 Introduction to Python Eng. Ibraheem Lubbad September 17, 2016 Introduction: Python is a high-level, object-oriented

More information

Python Problems MTH 151. Texas A&M University. November 8, 2017

Python Problems MTH 151. Texas A&M University. November 8, 2017 Python Problems MTH 151 Texas A&M University November 8, 2017 Introduction Hello! Welcome to the first problem set for MTH 151 Python. By this point, you should be acquainted with the idea of variables,

More information

THE IF STATEMENT. The if statement is used to check a condition: if the condition is true, we run a block

THE IF STATEMENT. The if statement is used to check a condition: if the condition is true, we run a block THE IF STATEMENT The if statement is used to check a condition: if the condition is true, we run a block of statements (called the if-block), elsewe process another block of statements (called the else-block).

More information

Python Programming Exercises 3

Python Programming Exercises 3 Python Programming Exercises 3 Notes: These exercises assume that you are comfortable with the contents of the two previous sets of exercises including variables, types, arithmetic expressions, logical

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

Creating Reports. There are several types of reports. We'll use Access Wizards and Tabs/Ribbons to design several simple reports.

Creating Reports. There are several types of reports. We'll use Access Wizards and Tabs/Ribbons to design several simple reports. Creating Reports In this tutorial we'll cover the very basic steps of creating Reports. A good manual or some knowledgeable assistance will be essential to mastering reports. There are several types of

More information

Decisions, Decisions. Testing, testing C H A P T E R 7

Decisions, Decisions. Testing, testing C H A P T E R 7 C H A P T E R 7 In the first few chapters, we saw some of the basic building blocks of a program. We can now make a program with input, processing, and output. We can even make our input and output a little

More information

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming Topics C H A P T E R 1 Introduction to Computers and Programming Introduction Hardware and Software How Computers Store Data Using Python Introduction Computers can be programmed Designed to do any job

More information

NESTED IF STATEMENTS AND STRING/INTEGER CONVERSION

NESTED IF STATEMENTS AND STRING/INTEGER CONVERSION LESSON 15 NESTED IF STATEMENTS AND STRING/INTEGER CONVERSION OBJECTIVE Learn to work with multiple criteria if statements in decision making programs as well as how to specify strings versus integers in

More information

Invent Your Own Computer Games with Python

Invent Your Own Computer Games with Python Hello Wor ld! Invent Your Own Computer Games with Python Taesoo Kwon Heejin Park Hanyang University Introduction to Python Python Easier to learn than C. Serious programming language. Many expert programmers

More information

CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic. Aaron Stevens 28 March Overview/Questions

CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic. Aaron Stevens 28 March Overview/Questions CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic Aaron Stevens 28 March 2011 1 Overview/Questions Review: Programmability Why learn programming? What is a programming language?

More information

What Version Number to Install

What Version Number to Install A Python Primer This chapter provides a quick overview of the Python language. The goal in this chapter is not to teach you the Python language excellent books have been written on that subject, such as

More information

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL We have spent the first part of the course learning Excel: importing files, cleaning, sorting, filtering, pivot tables and exporting

More information

Seagate Crystal Reports 8 and Hyperion Essbase

Seagate Crystal Reports 8 and Hyperion Essbase Seagate Crystal Reports 8 and Hyperion Essbase Seagate Crystal Reports 8 provides dramatic improvements in OLAP reporting for users of Hyperion Essbase and all other supported OLAP systems. Now more than

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

Introduction to Programming with Python 3, Ami Gates. Chapter 1: Creating a Programming Environment

Introduction to Programming with Python 3, Ami Gates. Chapter 1: Creating a Programming Environment Introduction to Programming with Python 3, Ami Gates Chapter 1: Creating a Programming Environment 1.1: Python, IDEs, Libraries, Packages, and Platforms A first step to learning and using any new programming

More information

nostarch.com/pfk For bulk orders, please contact us at

nostarch.com/pfk For bulk orders, please contact us at nostarch.com/pfk For bulk orders, please contact us at sales@nostarch.com. Teacher: Date/Period: Subject: Python Programming Class: Topic: #1 - Getting Started Duration: Up to 50 min. Objectives: Install

More information

Part 6b: The effect of scale on raster calculations mean local relief and slope

Part 6b: The effect of scale on raster calculations mean local relief and slope Part 6b: The effect of scale on raster calculations mean local relief and slope Due: Be done with this section by class on Monday 10 Oct. Tasks: Calculate slope for three rasters and produce a decent looking

More information

Lists and Loops. defining lists lists as queues and stacks inserting and removing membership and ordering lists

Lists and Loops. defining lists lists as queues and stacks inserting and removing membership and ordering lists Lists and Loops 1 Lists in Python defining lists lists as queues and stacks inserting and removing membership and ordering lists 2 Loops in Python for and while loops the composite trapezoidal rule MCS

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

COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5)

COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5) COM110: Lab 2 Numeric expressions, strings, and some file processing (chapters 3 and 5) 1) Practice submitting programming assignment 1. Take a few arbitrary modules (.py files) that you have written and

More information

ASCII Art. Introduction: Python

ASCII Art. Introduction: Python Python 1 ASCII Art All Code Clubs must be registered. Registered clubs appear on the map at codeclub.org.uk - if your club is not on the map then visit jumpto.cc/18cplpy to find out what to do. Introduction:

More information

Exploring Python Basics

Exploring Python Basics CptS 111 Lab #1 Exploring Python Basics Learning Objectives: - Use the IDLE Shell window to run Python interactively - Use the IDLE Editor window to write a Python program (script) - Run Python programs

More information

C H A P T E R 1. Introduction to Computers and Programming

C H A P T E R 1. Introduction to Computers and Programming C H A P T E R 1 Introduction to Computers and Programming Topics Introduction Hardware and Software How Computers Store Data How a Program Works Using Python Computer Uses What do students use computers

More information

Track Changes in MS Word

Track Changes in MS Word Track Changes in MS Word Track Changes is an extremely useful function built into MS Word. It allows an author to review every change an editor has made to the original document and then decide whether

More information

Exploring Python Basics

Exploring Python Basics CptS 111 Lab #1 Fall 2017 Exploring Python Basics Learning Objectives: - Use the IDLE Shell window to run Python interactively - Use the IDLE Editor window to write a Python program (script) - Run Python

More information

S206E Lecture 19, 5/24/2016, Python an overview

S206E Lecture 19, 5/24/2016, Python an overview S206E057 Spring 2016 Copyright 2016, Chiu-Shui Chan. All Rights Reserved. Global and local variables: differences between the two Global variable is usually declared at the start of the program, their

More information

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python

More information

CS Prof J.P.Morrison

CS Prof J.P.Morrison CS1061 2018-2019 Prof J.P.Morrison C Programming C is the most popular language worldwide. Everything from microcontrollers to operating systems is written in C flexible and versatile, allowing maximum

More information

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer:

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer: C1 D6 Obj: cont. 1.3 and 1.4, to become familiar with identifiers and to understand how programming languages work HW: p.51 #1.8 1.9 (Short Answers) Chapter 1 Test in two class days!! Do Now: How is the

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

Algorithms and Programming I. Lecture#12 Spring 2015

Algorithms and Programming I. Lecture#12 Spring 2015 Algorithms and Programming I Lecture#12 Spring 2015 Think Python How to Think Like a Computer Scientist By :Allen Downey Installing Python Follow the instructions on installing Python and IDLE on your

More information

Lab 2: input(), if else, String Operations, Variable Assignment. Ling 1330/2330: Computational Linguistics Na-Rae Han

Lab 2: input(), if else, String Operations, Variable Assignment. Ling 1330/2330: Computational Linguistics Na-Rae Han Lab 2: input(), if else, String Operations, Variable Assignment Ling 1330/2330: Computational Linguistics Na-Rae Han Objectives Learn Python basics Taking input from keyboard with input() Commenting Comparison

More information

A Brief Introduction of how to use Audacity

A Brief Introduction of how to use Audacity A Brief Introduction of how to use Audacity Introduction To enable yourself to start Podcasting you need to have all the tools that make the process possible. An integral part of that process is the recording

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

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

Python for ArcGIS. Lab 1.

Python for ArcGIS. Lab 1. Python for ArcGIS. Lab 1. Python is relatively new language of programming, which first implementation arrived around early nineties of the last century. It is best described as a high level and general

More information

Lecture 1. basic Python programs, defining functions

Lecture 1. basic Python programs, defining functions Lecture 1 basic Python programs, defining functions Lecture notes modified from CS Washington CS 142 Except where otherwise noted, this work is licensed under: http://creativecommons.org/licenses/by-nc-sa/3.0

More information

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 Course Web Site http://www.nps.navy.mil/cs/facultypages/squire/cs2900 All course related materials will be posted

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

10 things you should know about Word 2010's mail merge tools

10 things you should know about Word 2010's mail merge tools 10 things you should know about Word 2010's mail merge tools By Katherine Murray December 6, 2010, 10:26 AM PST Takeaway: Word s mail merge process has traditionally been viewed as intimidating and complex.

More information

06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python

06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python CS95003 - Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / 2014 Subjects 1) Beginning with Python 2) Variables 3) Strings 4) Basic arithmetic operators 5) Flow control 6) Comparison

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

Variables, expressions and statements

Variables, expressions and statements Variables, expressions and statements 2.1. Values and data types A value is one of the fundamental things like a letter or a number that a program manipulates. The values we have seen so far are 2 (the

More information

Python Day 3 11/28/16

Python Day 3 11/28/16 Python Day 3 11/28/16 Objectives Review Concepts Types of Errors Escape sequences String functions Find the Errors bookcost = int(input("how much is the book: ")) discount = float(input("what is the discount:

More information

ENGG1811 Computing for Engineers Week 1 Introduction to Programming and Python

ENGG1811 Computing for Engineers Week 1 Introduction to Programming and Python ENGG1811 Computing for Engineers Week 1 Introduction to Programming and Python ENGG1811 UNSW, CRICOS Provider No: 00098G W4 Computers have changed engineering http://www.noendexport.com/en/contents/48/410.html

More information

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

PROGRAMMING FUNDAMENTALS

PROGRAMMING FUNDAMENTALS PROGRAMMING FUNDAMENTALS TESTING, MAIN, GLOBAL VARIABLES João Correia Lopes INESC TEC, FEUP 23 October 2018 FPRO/MIEIC/2018-19 23/10/2018 1 / 24 INTRODUCTION GOALS By the end of this class, the student

More information

Using IDLE for

Using IDLE for Using IDLE for 15-110 Step 1: Installing Python Download and install Python using the Resources page of the 15-110 website. Be sure to install version 3.3.2 and the correct version depending on whether

More information

Student Database Challenge Problem

Student Database Challenge Problem Student Database Challenge Problem For this challenge problem, we will create a small database of user information. The python code we write will be able to add new data to the database, save it to a file,

More information

CS1110 Lab 1 (Jan 27-28, 2015)

CS1110 Lab 1 (Jan 27-28, 2015) CS1110 Lab 1 (Jan 27-28, 2015) First Name: Last Name: NetID: Completing this lab assignment is very important and you must have a CS 1110 course consultant tell CMS that you did the work. (Correctness

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

Python Input, output and variables

Python Input, output and variables Today s lecture Python Input, output and variables Lecture 22 COMPSCI111/111G SS 2016! What is Python?! Displaying text on screen using print()! Variables! Numbers and basic arithmetic! Getting input from

More information

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems.

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. Plan for the rest of the semester: Programming We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems. We saw earlier that computers

More information

Python Input, output and variables. Lecture 22 COMPSCI111/111G SS 2016

Python Input, output and variables. Lecture 22 COMPSCI111/111G SS 2016 Python Input, output and variables Lecture 22 COMPSCI111/111G SS 2016 Today s lecture u What is Python? u Displaying text on screen using print() u Variables u Numbers and basic arithmetic u Getting input

More information

UTEXAS Embankment on Soft Clay

UTEXAS Embankment on Soft Clay GMS TUTORIALS Figure 1. Sample slope stability problem from the Utexam1.dat file provided with the UTEXAS4 software. 1 Introduction UTEXAS4 is a slope stability software package created by Dr. Stephen

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

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL We have spent the first part of the course learning Excel: importing files, cleaning, sorting, filtering, pivot tables and exporting

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

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

Creating Word Outlines from Compendium on a Mac

Creating Word Outlines from Compendium on a Mac Creating Word Outlines from Compendium on a Mac Using the Compendium Outline Template and Macro for Microsoft Word for Mac: Background and Tutorial Jeff Conklin & KC Burgess Yakemovic, CogNexus Institute

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

ECS15, Lecture 14. Reminder: how to learn Python. Today is the final day to request a regrade of the midterm. Topic 4: Programming in Python, cont.

ECS15, Lecture 14. Reminder: how to learn Python. Today is the final day to request a regrade of the midterm. Topic 4: Programming in Python, cont. ECS15, Lecture 14 Today is the final day to request a regrade of the midterm Topic 4: Programming in Python, cont. Turn in a short cover letter explaining the issue. Reminder: how to learn Python Type

More information

OOP and Scripting in Python Advanced Features

OOP and Scripting in Python Advanced Features OOP and Scripting in Python Advanced Features Giuliano Armano Emanuele Tamponi Advanced Features Structure of a Python Script More on Defining Functions Default Argument Values Keyword Arguments Arbitrary

More information

To see how ARP (Address Resolution Protocol) works. ARP is an essential glue protocol that is used to join Ethernet and IP.

To see how ARP (Address Resolution Protocol) works. ARP is an essential glue protocol that is used to join Ethernet and IP. Lab Exercise ARP Objective To see how ARP (Address Resolution Protocol) works. ARP is an essential glue protocol that is used to join Ethernet and IP. Requirements Wireshark: This lab uses the Wireshark

More information

Masternode Setup Guide. HexCash Coin. Masternode Setup Guide Version /

Masternode Setup Guide. HexCash Coin. Masternode Setup Guide Version / HexCash Coin Version 1.0.0 1 / 15 Welcome to the The Hex Ecosystem This guide will help you with setting up your own Masternode The guide is meant to be used with its accompanying Masternode Setup Script

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

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

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line 1.2 Adding Integers Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line Finding Sums Mentally The Commutative Property Finding Sums using And Patterns and Rules of Adding Signed

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

v. 9.1 GMS 9.1 Tutorial UTEXAS Embankment On Soft Clay Introduction to the UTEXAS interface in GMS for a simple embankment analysis

v. 9.1 GMS 9.1 Tutorial UTEXAS Embankment On Soft Clay Introduction to the UTEXAS interface in GMS for a simple embankment analysis v. 9.1 GMS 9.1 Tutorial UTEXAS Embankment On Soft Clay Introduction to the UTEXAS interface in GMS for a simple embankment analysis Objectives Learn how to build a simple UTEXAS model in GMS. Prerequisite

More information

How to export data from Reckon Quicken Personal Plus to Moneydance By Michael Young

How to export data from Reckon Quicken Personal Plus to Moneydance By Michael Young How to export data from Reckon Quicken Personal Plus to Moneydance 2011 By Michael Young The information provided in this guide is provided to help users of Reckon Quicken Personal Plus transfer data to

More information

Getting Started with Python

Getting Started with Python Getting Started with Python Python is a general purpose, high level programming language that is used in a variety of application domains. The Python language has a very clear and expressive syntax as

More information

Some Handy Computing and Graphing Tools

Some Handy Computing and Graphing Tools Some Handy Computing and Graphing Tools I. Google s Calculator Google has a graphing calculator application that is integrated into its search bar. For example, you can simply type 3/sin(2) into a search

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

18.1. CS 102 Unit 18. Python. Mark Redekopp

18.1. CS 102 Unit 18. Python. Mark Redekopp 18.1 CS 102 Unit 18 Python Mark Redekopp 18.2 Credits Many of the examples below are taken from the online Python tutorial at: http://docs.python.org/tutorial/introduction.html 18.3 Python in Context Two

More information

Part 1 (80 points) Multiple Choice Questions (20 questions * 4 points per question = 80 points)

Part 1 (80 points) Multiple Choice Questions (20 questions * 4 points per question = 80 points) EECS 183 Fall 2013 Exam 1 Part 1 (80 points) Closed Book Closed Notes Closed Electronic Devices Closed Neighbor Turn off Your Cell Phones We will confiscate all electronic devices that we see including

More information

Python for Informatics

Python for Informatics Python for Informatics Exploring Information Version 0.0.6 Charles Severance Chapter 3 Conditional execution 3.1 Boolean expressions A boolean expression is an expression that is either true or false.

More information

Communication Process (1)

Communication Process (1) The Communication Process Theories of how we communicate: The Linear and Transactional models Communication Process (1) Scholars have developed theories to explain how we communicate with each other. Most

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Python Lab 7: if Statement PythonLab7 lecture slides.ppt 14 November 2017 Ping Brennan (p.brennan@bbk.ac.uk) 1 Getting Started Create a new folder in your disk space with the

More information

HRS-9 Data Slice Editing and Math. Jon Brown 2013

HRS-9 Data Slice Editing and Math. Jon Brown 2013 HRS-9 Data Slice Editing and Math Jon Brown 2013 Overview HRS-9 has several tools for editing, combining, or processing horizons and data slices. This document includes: Automated Math processes. An example

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information