Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission.

Similar presentations


Presentation on theme: "CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission."— Presentation transcript:

1 CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is given to CS122 Spring 2009 staff and students to use and reproduce these notes for their own use.

2 Your class instructor and TA Instructor for this section: Your TAs are:

3 Class Overview Syllabus and Course Information Functions (Parameter Types)‏ Random Number Generators Solving With Inequalities Animations

4 Class syllabus Paper copies distributed in class Copy available on-line Grading policies, quiz schedules, cheating penalties, etc. explained – read it!

5 Class web page www.cs.drexel.edu/cs122/summer2009/ bbVista page –http://learning.drexel.eduhttp://learning.drexel.edu

6 Class schedule Lab every other week during the term Weeks 2, 3, 4, 5 –Attendance required –4 Labs vs. 5 Labs in CS 121 –Verification sheet (one per lab team) Do the work in lab Get sheet signed by lab staff Turn in sheet at end of lab period as record of what you’ve done

7 Other class requirements Take on-line quiz in weeks 2, 3, 4, 5 –Based on lab from week of. –Typically due 4:30pm Friday. –Can take quiz from any internet/browser-enabled computer. –Use CLC in UCROSS 147 for face-to-face help Th (1-5) and Fr (12:30-4:30) – Every week Class proficiency exam in week 5 (7/22) recitation. –Proficiency exam is taken “live” during your regularly scheduled lab period.

8 What counts towards class grade, what doesn’t count Doing lab work during lab. –Make up labs for those with valid excuse –Talk to your instructor to get into a make up lab. Can get credit for a make up lab only with instructor’s permission, since only they record your lab grades. Take quiz in week after the lab. –Some questions may involve dynamically generated components so you won’t get the exact same questions all the time. –Some questions on the quiz will have “how do I do” which allows you to find out if you got it right or wrong and try again. –May retake quiz as many times as you wish, up to deadline. –System can hold at most 70 people at once so avoid taking exams at the last minute. Proficiency exam is “traditional” – take it proctored in class in week 5.

9 Functions and Parameter Types Functions can take any kind of parameter, not just numbers, a very useful property. –Lists, Sets, Equations, Expressions, etc. –Allows us to take in a variable number of parameters

10 Functions and Parameter Types If we use lists, we can easily repeatedly call the function on a list of inputs:

11 Functions and Parameter Types Everything in Maple has a type. This can be: –Kind of value –Permissible Operation

12 Functions and Parameter Types Types are how Maple interprets variables Sometimes we can turn types into others Converting list to a sum:

13 Functions and Parameter Types

14 Notes on ‘Convert’ Convert’s second parameter takes a type –Anything return by the ‘whattype’ To write special characters, use backquotes (``) –`+` –`*`

15 Random Number Generators Often we want to simulation real events We need to fetch number “randomly” –Maple generates psuedo-random numbers (rand function)

16 Testing Maple’s rand Function The approximation of “randomness” is good.

17 Solving With Inequalities Sometimes we solve equations with multiple solutions. We want to limit the solution set to certain criteria. –We can use inequalities! Example: Quadratic with positive/negative roots

18 Solving With Inequalities Recall: To solve a system of equations, we give a set of equations to solve.

19 Constraining Solutions

20 We use ‘assuming’ when result is piecewise. This cuts the number of possible solutions:

21 Animations Animations in Maple –Once generated can be played with the Maple worksheet (chapter 6 from CS 121) –Can be exported as gifs to be placed in a web page (www.cs.drexel.edu/~bchar/card08.html)www.cs.drexel.edu/~bchar/card08.html Steps for making animation: –Create a list of plots Each element represents one frame of animation Use plots[display]() to display the list in order

22 Animations Example:

23 What you should do now Connect to class web page: www.cs.drexel.edu/cs122/spring2009 www.cs.drexel.edu/cs122/spring2009 Start up Maple 13 Read Lab 1 directions. Do the work with your partner(s). Both should try to do the work, but the grader will need to look at only one answer to give you credit for doing the problem.

24 Finishing up – save files Make sure your name/user id/section number/date, time/instructor name are on the verification sheet. Get the verification sheet signed and handed in. Save worksheet on desktop if you haven’t done so already. You can call the file “MyLab1CS122”. This will create a file called MyLab1CS122.mw. Submit a copy to Blackboard site. Email a copy to yourself and/or your lab partners as an attachment so you can look at what you did for review purposes later..mw file should open correctly on any Maple 12 (Mac, Windows, Linux) – file format is portable across system types.

25 Next week – Take quiz 1! Take the first quiz, starting this week – Tuesday - Friday. Go to CLC if you need face-to-face help Don’t wait until the last minute to discover that you needed more time to complete the quiz!


Download ppt "CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission."

Similar presentations


Ads by Google