CS1315: Introduction to Media Computation Introduction to JES.

Slides:



Advertisements
Similar presentations
Do I need a robot today? You only need a robot if your team has not shown me your octagon and/or the octagon in a function.
Advertisements

Objectives 1.Identify the functions of a spreadsheet 2.Identify how spreadsheets can be used. 3.Explain the difference in columns and rows. 4.Locate specific.
CS1315: Introduction to Media Computation Introduction to Programming.
Created by Mark Guzdial, Georgia Institute of Technology; modified by Robert H. Sloan, University of Illinois at Chicago, For Educational Use. CS.
Media Computation in JES (Chapter 2) DM Rasanjalee Himali.
Python: Making colors and Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
Chapter 2: Introduction to Programming. Chapter Learning Objectives.
01-IntroToMediaComp1 Barb Ericson Georgia Institute of Technology Oct 2010 Introduction to Computer Science and Media Computation.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
James Tam Programming: Part I In this section of notes you will learn how to write simple Jython programs using JES.
James Tam Programming: Part I In this section of notes you will learn about how to write simple programs using JES.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Graphics in Python using the JES environment
Computer Science 101 Introduction to Programming.
CS 102 Computers In Context (Multimedia)‏ 01 / 28 / 2009 Instructor: Michael Eckmann.
Adding Content To Your Faculty Page 1.Login 2.Create your Faculty Page 3.
CS 101: Introduction to Computing Programming picture manipulations Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by.
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Download JES Tool JES: Jython Environment for Students
Lecture # 27 Python I. Python “Interpretive” language (vs. compiled) So is HTML, JavaScript. Python supports file I/O. JavaScript doesn’t Python is a.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Playing Music in Alice By David Yan Under the direction of Professor Susan Rodger July 2015.
INTEGRATION TO GENERATE MOTIVATION TO LEARN INTEGRATION TO FOSTER CREATIVITY.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Python programming Introduction to the JES environment and basics of Python Reading: Chapters 1, 2 from “Introduction to Computing and Programming in Python”
Downloading and Installing Autodesk Revit 2016
CS1315: Introduction to Media Computation Introduction to Programming.
RIGHT Mouse Button Formatting Cut Copy Paste Save LEFT Mouse Button MAIN BUTTON Single clicks Double clicks Drag Highlight.
CS 100 Introduction to Computing Introduction to JES Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by Robert H. Sloan.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
01-IntroToMediaComp1 Barb Ericson Georgia Institute of Technology Feb 2010 Introduction to Computer Science and Media Computation.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Changing colors in an area Part 3: Chromakey.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
1 CS 177 Week 2 Recitation Slides Variables, Files and Functions.
Introduction to Programming Python Lab 5: Strings and Output 05 February PythonLab5 lecture slides.ppt Ping Brennan
Python programming Introduction to the JES environment and basics of Python.
CS1315: Introduction to Media Computation Introduction to Programming.
CSx 4091 – Python Programming Spring 2013 Lecture L2 – Introduction to Python Page 1 Help: To get help, type in the following in the interpreter: Welcome.
Intro CS and Media Computation1 Barb Ericson Georgia Institute of Technology Feb 2010 Introduction to Computer Science and Media Computation.
Python programming Using the JES picture functions and defining new functions.
CS1315: Introduction to Media Computation Introduction to JES.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Multimedia Summer Camp
Development Environment
A Playful Introduction to Programming by Jason R. Briggs
Introduction to Programming
Download JES Tool JES: Jython Environment for Students
Introduction to Python
Introduction to the JES environment and basics of Python
CS1315: Introduction to Media Computation
Chapter 2: Introduction to Programming
Chapter 2: Introduction to Programming
Agenda – 1/31/18 Questions? Group practice problems
A Media Computation Cookbook
Introduction to Programming
Workshop for Programming And Systems Management Teachers
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
CS 177 Week 3 Recitation Slides
Chapter 1: Programming Basics, Python History and Program Components
CS1315: Introduction to Media Computation
General Computer Science for Engineers CISC 106 Lecture 03
Introduction to Programming
Mu Editor – New User Cheat Sheet – CircuitPython Mode
Mu Editor – New User Cheat Sheet – CircuitPython Mode
Presentation transcript:

CS1315: Introduction to Media Computation Introduction to JES

Installation Installing JES and starting it up  Windows users: Just copy the folder Double-click JES application  Mac users: Just copy the folder Double-click the JES application Fill out the form for turnin (can always change it later) There is always Help  Lots and lots of excellent help

We will program in JES JES: Jython Environment for Students A simple editor (for entering in our programs or recipes): We’ll call that the program area A command area for entering in commands for Python to execute.

JES - Jython Environment for Students

Tour of JES Save and Save As Cut/Copy/Paste with shortcut keys Turnin  You must be on-line to turnin!  You will use this first with Lab 2 Help  Explain is contextualized help: Highlight a JES (media) function  Lots of help on mediatools and the like

Python understands commands We can name data with = We can print values, expressions, anything with print

Using JES >>> print >>> print 34.1/ >>> print 22 * >>> print >>> print "Hello" Hello >>> print "Hello" + "Mark" HelloMark

Command Area Editing Up/down arrows walk through command history You can edit the line at the bottom  Just put the cursor at the end of the line before hitting Return/Enter.

Demonstrating JES for files and sounds >>> print pickAFile() /Users/guzdial/mediasources/barbara.jpg >>> print makePicture(pickAFile()) Picture, filename /Users/guzdial/mediasources/barbara.jpg height 294 width 222 >>> print pickAFile() /Users/guzdial/mediasources/hello.wav >>> print makeSound(pickAFile()) Sound of length >>> print play(makeSound(pickAFile())) None >>> myfilename = pickAFile() >>> print myfilename /Users/guzdial/mediasources/barbara.jpg >>> mypicture = makePicture(myfilename) >>> print mypicture Picture, filename /Users/guzdial/mediasources/barbara.jpg height 294 width 222 >>> show(mypicture)

Writing a recipe: Making our own functions To make a function, use the command def Then, the name of the function, and the names of the input values between parentheses (“(input1)”) End the line with a colon (“:”) The body of the recipe is indented (Hint: Use two spaces)  That’s called a block

Making functions the easy way Get something working by typing commands Enter the def command. Copy-paste the right commands up into the recipe

A recipe for playing picked sound files def pickAndPlay(): myfile = pickAFile() mysound = makeSound(myfile) play(mysound) Note: myfile and mysound, inside pickAndPlay(), are completely different from the same names in the command area.

Blocking is indicated for you in JES Statements that are indented the same, are in the same block. Statements that are in the same block as where the line where the cursor is are enclosed in a blue box.

A function for playing picked picture files def pickAndShow(): myfile = pickAFile() mypict = makePicture(myfile) show(mypict)

The Most Common JES Bug: Forgetting to Load Your function does NOT exist for JES until you load it  Before you load it, the program is just a bunch of characters.  Loading encodes it as an executable function Save and Save As  You must Save before Loading  You must Load before you can use your function

What if you forget your variable names? showVars()

MOST IMPORTANT THING TO DO TO PASS THIS CLASS! DO THE EXAMPLES! Try them out for yourself. Try to replicate them. Understand them  EVERY WEEK, TYPE IN AT LEAST TWO OF THE EXAMPLES FROM CLASS To understand a program means that you know why each line is there. You will encounter all the simple-but-confusing errors early—BEFORE you are rushing to get homework done!!