rec2 - CS 177 Week 2 Recitation Slides Variables, Files and...

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

View Full Document Right Arrow Icon
1 CS 177 Week 2 Recitation Slides Variables, Files and Functions
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Announcements Get your I-Clickers to class next time.
Background image of page 2
3 ANY QUESTIONS?
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Table of content Variables Files Functions What is a function? Why to use a function? How to write a function in JES? Functions with Parameters JES essentials JES (predefined) functions picture & sound pickAFile() makePicture() makeSound() show() play()
Background image of page 4
Variables Are names for objects that have values in main memory. We define variables by assigning values to names: Example: >>>a = 9 >>>b = 13.54 >>>c = “Computer” Variables can change their values during the program. It’s important to choose good names that describes the variable. Example: firstName, courseNo, etc. 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Files Are collection of larger objects and values (byte) on the hard disk of the computer. Files can contain text, picture, sound, video, etc. Files have names File names have suffixes (.jpg, .wav, .mp3, and so forth) 6
Background image of page 6
Functions Collection of instructions that perform a task as:
Background image of page 7

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

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

Page1 / 26

rec2 - CS 177 Week 2 Recitation Slides Variables, Files and...

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

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