Today s Topics... Intro to Computer Science (cont.) Python exercise. Reading Assignment. Ch 1: 1.5 (through 1.5.2) Lecture Notes CPSC 121 (Fall 2011)



Similar documents
Virtual Owl. Guide for Windows. University Information Technology Services. Training, Outreach, Learning Technologies & Video Production

How to use SURA in three simple steps:

Virtual Office Remote Installation Guide

There s a variety of software that can be used, but the approach described here uses freely available Cygwin software: (1) Cygwin/X (2) Cygwin/openssh

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Accessing Windows 7 in the Student Labs

Mapping the ITS File Server Folders to Mosaic Windows

How to Connect to Remote Desktop & How to Use Cisco AnyConnect Secure Mobility Client Secure VPN Connection

Changing Your Cameleon Server IP

Installing the Virtual Desktop Application (MAC)

Backing up with Windows 7

Installing the VPN Page 2 Accessing and Using the VPN.Page 4 Accessing the Elementary Progress Report...Page 6 Accessing IEP Plus...

Disabling Microsoft SharePoint in order to install the OneDrive for Business Client

NextGen Setup Guide First-time Workstation Setup & Logging In

Installing the VPN Page 2 Accessing and Using the VPN.Page 4 Accessing the Elementary Progress Report...Page 6 Accessing IEP Plus...

The FlexiSchools Online Order Management (FOOM) Installation Guide

End User Service Desk Guide

Hosting Users Guide 2011

Running Argos via VPN client

Lawson Portal User s Manual

Mesa DMS. Once you access the Mesa Document Management link, you will see the following Mesa DMS - Microsoft Internet Explorer" window:

Outlook to Windows Live Mail

CS 103 Lab Linux and Virtual Machines

Setting up in Outlook Express

Joining an XP workstation to a domain Version 1.00

Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class

Python Programming: An Introduction to Computer Science

PEMBINA TRAILS SCHOOL DIVISION. Information Technology Department. Mayet Online Reports

MS SQL Server 2008 Express Installation Instructions (09/27/09)

Installing the SSH Client v3.2.2 For Microsoft Windows

WA2192 Introduction to Big Data and NoSQL. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

TAMUS Terminal Server Setup BPP SQL/Alva

How to Use? SKALICLOUD DEMO

Instructions for using VPN and accessing your files remotely

Active Directory Integration for Greentree

MiraCosta College now offers two ways to access your student virtual desktop.

Overview Using the Secure Desktop Agent Troubleshooting... 10

POLARIS INSTALLATION

Introduction To Version Control With Mercurial

Running Windows XP Mode with Windows Virtual PC A How-to Guide for Small Businesses

ParishSOFT Remote Installation

Using SSH Secure Shell Client for FTP

SysAidTM Freeware Installation Guide

Miami University RedHawk Cluster Connecting to the Cluster Using Windows

New BAT Login Access Procedures Follow these steps to Login to the BAT System

The Citrix service is now available to faculty and staff at Cypress College.

How to install and set up the WinSCP software for Secure File Transfer

Lawson Employee Self Service User s Manual

Remote Access Instructions

VPN User Guide: Own Device (Windows) Staff: Malaysia Campus

How to Remotely Access the C&CDHB Network from a Personal Device

Virtual Computing Lab: Using SPSS

Using the Remote Desktop Portal

Introduction to Windows XP

Vestal Central School District New Service Desk System: Service-Now Go live July 2, 2011

PPUM icare SINGLE SIGN ON

ELR (Educational Lending Right) School Library Survey Matching Program for Amlib Installation and User Guide

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Introduction to using Skype. Install Skype on your Computer. Getting Started

1. Getting Started 2. Installing the Client 3. Logging On 4. Connecting to a Virtual Machine 5. Changing User Preferences 6.

Introduction to Mac Operating System: Snow Leopard

Computer Science and Engineering MacOS Cisco VPN Client Installation and Setup Guide

ClicktoFax Service Usage Manual

CEFNS Web Hosting a Guide for CS212

Using Internet or Windows Explorer to Upload Your Site

INSTALLATION INSTRUCTIONS FOR UKSSOGATEWAY

How to use FTP Commander

The FlexiSchools Online Order Management System Installation Guide

University of Toronto

Python Programming: An Introduction to Computer Science

Setting up a VPN connection Windows XP

How To Set Up Dataprotect

Using the Remote Desktop Portal

Connecting to the Terminal Server

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

4. Click Next and then fill in your Name and address. Click Next again.

Hallpass Instructions for Connecting to Mac with a Mac

Introduction to Webmail. Apache County Library District April 2011

1. Scope of Service. 1.1 About Boxcryptor Classic

QUIT MACSCHOOL AND DRAG YOUR SERVER ICONS TO THE TRASH OR HIT THE DISCONNECT BUTTON BESIDE THE SERVER ICON IN THE TOP SIDEBAR

UNCSA Office In The Cloud

Driver Updater Manual

Proofpoint provides the capability for external users to send secure/encrypted s to EBS-RMSCO employees.

CS 1133, LAB 2: FUNCTIONS AND TESTING

Remote Desktop Services User's Guide

Windows 7 Hula POS Server Installation Guide

USING CAMPUS ANYWARE OVER THE VPN (WINDOWS XP)

TAMUS Remote Desktop Setup For BPP SQL & Alva

Setting Up Monthly Reporter

Installing Microsoft Outlook on a Macintosh. This document explains how to download, install and configure Microsoft Outlook on a Macintosh.

ILS Introduction to e-services

TUSCULUM COLLEGE. Ellucian Go: Installing and using the mobile application

Table of Contents. OpenDrive Drive 2. Installation 4 Standard Installation Unattended Installation

On your desktop double-click the Qqest Time and Attendance Systems icon:

KSC Remote Access Solution

PhoneCrypt Desktop. Phone Encryption Software. PhoneCrypt Manual Mobile phone encryption for Windows Platforms

Remote Desktop Web Access. Using Remote Desktop Web Access

Installing and Configuring Remote Desktop Connection Client for Mac

Transcription:

Today s Topics... Intro to Computer Science (cont.) Python exercise Reading Assignment Ch 1: 1.5 (through 1.5.2) S. Bowers 1 of 8

Computation (cont.) What parts do recipes usually have? A description (the requirements) An ingredient list (the input) A set of ordered steps to perform (a procedure) A recipe is an example of procedural (imperative) knowledge Knowledge of how to perform some task (or process) A recipe gives a procedure to create ( compute ) an output from input Declarative knowledge only tells us about the output, not how to produce it Computation is a process for performing certain tasks Like the process of making your favorite dessert We typically think of computation as a process that manipulates data That is, computing (deriving) new data from existing data Computation is directed by a series of instructions Often called procedures, methods, or algorithms We write these down using a programming language A procedure written in a programming language is called a program Computers execute programs for us S. Bowers 2 of 8

At the 10,000 foot level, as programmers We figure out what the instructions should be (the algorithm) We write them down as a program (in a programming language) We give the program to a computer with input data The computer runs the program on input data (the computation process) And supplies the output A computer is a general-purpose machine (aka universal machine ) Instead of being able to execute only one or a few types of processes e.g., like a toaster or a car wash A computer can perform any computation According to the Church-Turing Thesis Everything computable is computable by a Turing Machine But you have to give it the instructions :-) S. Bowers 3 of 8

Another example... Consider the following two statements 1. x is y such that y 2 = x for y 0 2. To find an approximation of x, make a guess g, improve the guess by averaging g and x/g, and continue until g is good enough What type of knowledge do each of these represent? Another way to think of computation... (from Abelson & Sussman) Computation is like a sorcerer s idea of a magical spirit Cannot be seen or touched, is not composed of matter The programs we use to conjure computations are like a sorcerer s spells From symbolic expressions in arcane, esoteric programming langauges Used to prescribe the tasks we want our computations to perform We ll conjure our (computational) spirits in a magical language called Python Learning to program is considerably less dangerous than learning sorcery Computational spirits are conveniently contained within a computer In case you aren t convinced... def square_root(x, d): g = 1 # not a great guess for i in range(1, d): g = (g + (x/g))/2 return g S. Bowers 4 of 8

Getting started in the CS Lab The CS lab guide http://www.cs.gonzaga.edu/startup_guide.html The computers run the Linux (CentOS) operating system Similar to MS Windows and MacOS, but different Login using GU userid and password If you can t login, send email to Jason Schnagl (schnagl@gonzaga.edu, PC 216, 313-3534) Double-click on the IDLE 3.2 desktop icon Starts a basic Python Shell Shows a prompt >>> called a chevron You can start typing statements at the prompt (e.g., 3+4) IDLE includes a simple code editor From the Python Shell window click File > New Window In the new window, note there is no prompt You can enter statements into the window You are creating/editing a Python module (more later) S. Bowers 5 of 8

After you enter statements, you can run the module You need to save the module file first You might create a cpsc121 folder and save the file, e.g., as lab1.py Run the module by clicking Run > Run Module in the editor (not the shell) You can also hit the F5 shortcut key After you run the module, you ll see RESTART in the Python Shell This is where you wold see the output of your program Print statements The Python Shell prints the result of every statement entered E.g., >>> 3 + 4 prints 7 In a module, you have to explicitly tell Python to print the result of a statement E.g., print(3 + 4) prints 7 in the Python Shell Whereas the statement 3 + 4 doesn t print anything S. Bowers 6 of 8

Basic file management Double-click on the Home folder icon on the desktop For me, this is bowers s Home Printing Select File > Print Window from within Python Shell or the editor and select the Default Printer Don t forget to logout! Select System > Log Out from the menu bar on the desktop Don t need to shut down the computer, but do need to log out S. Bowers 7 of 8

Exercise: The Hello World! Program By convention, the first program written when learning a new langauge >>> print("hello World!") Hello World! >>> In Python, this is a super-easy program to write Exercise: 1. Start IDLE 2. Using the Python Shell, use print to display Hello World! 3. Try print with other strings 4. Send your session to the printer 5. Repeat the above, but use the editor instead of the Python Shell 6. Put your name on both hardcopies and turn them in Notes: print is a function We call the print function We pass arguments to function calls The number of arguments depends on the function S. Bowers 8 of 8