labsapco1p00 - APCO/IASC 1P00 Lab 1 Week starting 17th...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
APCO/IASC 1P00 Lab 1 Week starting 17th September 2009 The objective of this lab is to get you familiar with the Department's computer systems, as well as the Jython Environment (JES) that we will be using to learn programming. Programming is an area in which the best way to learn is to practice! There is nothing wrong with working with a partner on any of these exercises — but be sure that you understand everything yourself. New concepts frequently build upon old ones, so stay on top of your work, and practice, practice, practice! a. Walkthrough (with TA) of logging in, changing your password, familiarizing yourself with the file system (including Z-Drive.) See Handout, with Syllabus, from first lecture b. Walkthrough (with TA) of JES: Opening, Saving, Loading, Editing, and the difference between the two panes c. d. Warmup and Exercises 1, 2 and 3 (see below). The bug on your screen will not be the only bug you'll encounter in this course!! e. Continue to experiment with JES on your own Warmup! In the Command area or lower pane, enter these two lines (i.e. type just the highlighted text and press Enter after each line.) Note that the three >s need not be typed—they make up JES's prompt: >>> x = 5 >>> x = x + 4 What is the value in x after the second command? Can you explain why it has that value? (Use print x to display the value.) What's the new value of x if you repeat the second command? (Remember that you can recall the previous command(s) by pressing the up arrow key.) Explain what happens when the following command is then entered: >>> y = y + 12 What gets printed by the following? Try and work out each answer before actually executing the command in the interactions pane. >>> print ((8 * 4) + (7 - 3)) / (2 + 4) >>> print 8 * 4 + 7 - 3 / 2 + 4 >>> temp1 = ((8 * 4) + (7 - 3)) >>> temp2 = 2 + 4 >>> print temp1 / temp2 >>> print temp2 / temp2 Exercise 1 This exercise will demonstrate your ability to open a picture file, and display the image on your screen. Task: Copy, run and understand Program 1, pg 30 . If you navigate to the MediaSources directory on the C: drive, you can obtain a suitable picture file (a .jpg file). Read the text following the program in the book to learn about loading and running a program. Exercise 2 This exercise will demonstrate your ability to open a sound file, and play the sound back for you (us?!) to hear. Note : Make sure that your computer's volume is set to a reasonable (low) level — but not muted! . Click the loudspeaker icon in the System tray (lower right corner of the screen) to lower the volume. Task: Copy, run and understand Program 2, pg 31 Exercise 3 In this exercise, you are going to create a PDF file of the function you ran in Exercise 1, together with the picture that was output. As all the assignments require you to submit PDF files of your work for marking, it is essential that you know how to create these files. (If you use a Mac, the methods used might vary.) Task: Do Assignment 0.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

labsapco1p00 - APCO/IASC 1P00 Lab 1 Week starting 17th...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online