sit in the assigned area; introduce yourself to your group

18
Group Student Name 5 Alkattan, Dana 4 Ashford, Andrew 6 Balogh, Marko 1 Barnes, Emma 2 Browne, James 1 Carlile, Jennica 6 Christian, Cole 5 Denagnon, Guy-Herve 4 Drake, Peter 2 Dunaway, Michelle 2 Elendu, Chinedu 3 Erbe, Joshua 3 Fontleroy, Taishawn 3 Freund, Max 1 Gates, Kiara 6 Gibbs, Karli 5 Gillingham, Lorne Group Student Name 2 Gonzalez Hipolito, Janet 4 Graves, Paul 5 Grill, Nick 2 Hines, Dena 3 Huckleberry, Scott 1 Hurley, Julia C. 6 Johnson, Michelle 5 Kidane, Beraki 3 Lang, Travis 6 Lee, Andrew 5 Leslie, Michael 2 Lund, William 3 McConnehey, Kevin 6 Morales, Luis 6 Nagy, Paul 6 Nguyen, Ngan 1 Poarch, William 1 Rencher, Brooke Group Student Name 3 Rigby, Philip 2 Saucedo, Jennifer 1 Seifian, Sawber 6 Shostek, Nathan 2 Sinsheimer, Joshua 4 Smith, Nathan 4 Solberg, Jennifer 4 Sorrels, Isaac 3 Spohrer, Matthew 1 Starr, Joseph 1 Stewart, Morgan 3 Surgeon, Jonathan 3 Vuong, Leon 4 Warner, Kimberly 5 Whitney, Conrad 2 Williams, Maxine 2 Williams, Dominic 6 Wion, Shale 5 Yi, Arella 1 Sit in the assigned area; introduce yourself to your group If not on list, join group 4 or 5

Upload: others

Post on 22-Apr-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sit in the assigned area; introduce yourself to your group

Group Student Name 5 Alkattan, Dana 4 Ashford, Andrew 6 Balogh, Marko 1 Barnes, Emma 2 Browne, James 1 Carlile, Jennica 6 Christian, Cole 5 Denagnon, Guy-Herve 4 Drake, Peter 2 Dunaway, Michelle 2 Elendu, Chinedu 3 Erbe, Joshua 3 Fontleroy, Taishawn 3 Freund, Max 1 Gates, Kiara 6 Gibbs, Karli 5 Gillingham, Lorne

Group Student Name

2 Gonzalez Hipolito, Janet

4 Graves, Paul 5 Grill, Nick 2 Hines, Dena 3 Huckleberry, Scott 1 Hurley, Julia C. 6 Johnson, Michelle 5 Kidane, Beraki 3 Lang, Travis 6 Lee, Andrew 5 Leslie, Michael 2 Lund, William 3 McConnehey, Kevin 6 Morales, Luis 6 Nagy, Paul 6 Nguyen, Ngan 1 Poarch, William 1 Rencher, Brooke

Group Student Name

3 Rigby, Philip 2 Saucedo, Jennifer 1 Seifian, Sawber 6 Shostek, Nathan 2 Sinsheimer, Joshua 4 Smith, Nathan 4 Solberg, Jennifer 4 Sorrels, Isaac 3 Spohrer, Matthew 1 Starr, Joseph 1 Stewart, Morgan 3 Surgeon, Jonathan 3 Vuong, Leon 4 Warner, Kimberly 5 Whitney, Conrad 2 Williams, Maxine 2 Williams, Dominic 6 Wion, Shale 5 Yi, Arella

1

Sit in the assigned area; introduce yourself to your group

If not on list, join group 4 or 5

Page 2: Sit in the assigned area; introduce yourself to your group

CS 161 Introduction to Programming

and Problem-solving

Prof Andrew P. Black

2

Page 3: Sit in the assigned area; introduce yourself to your group

Housekeeping• Lecture–lab‣ Tu—Th 12:00 — 13:50 Cramer 269

• Lab (optional)‣ Tu 14:00–15:50 UTS 203 and

F 10:00–11:50 UTS 308

‣ Strongly advised to attend!

• Piazza: ‣ piazza.com/pdx/spring2017/cs161

3

Page 4: Sit in the assigned area; introduce yourself to your group

Your turn

• Start up the Grace IDE.‣ www.cs.pdx.edu/~grace/ide

• Type this program:print "Welcome to CS 161"

• Run it

4

Page 5: Sit in the assigned area; introduce yourself to your group

Syllabus

5

Syllabus for CS 161Spring 2017This course is an introduction to the fundamental concepts of computer science: problem solving, algorithm and program design. It focusses on designing programs, and introduces the data types, loops, conditional execution, subprograms, and lists. Students will learn to write programs in a the high level object-oriented programming language. The course will also survey some broader aspects of computer science.

GoalsTo introduce students to the fundamental concepts of problem solving using a computer. The course will emphasize expressing solutions in the Grace programming language. Students are encouraged to develop a consistent programming style and a systematic approach to program design.

Major Topics:• Solving Problems with Computers• Automated testing, and test-driven design• Algorithms: what they are and how to write them• Survey of high level programming languages• Using data, variables and defined constants• Controlling execution with conditionals and loops• Defining methods• Built-in collections: lists and sets (and dictionaries, if time permits)• Survey of social and ethical aspects of computing• Learn how to use the Unix command-line interface (if time permits)

Detailed list of programming Topics:

• dialect statement• arithmetic expressions (+, –, *, /, ÷, %, and parentheses)• assignment statements• top-level methods like max and min.• minitest dialect and test-driven development• import statement• random module• string expressions (++, *, and parentheses)• string methods (as listed in standardGrace documentation)• defining methods; returning values

Page 6: Sit in the assigned area; introduce yourself to your group

Programming Topics• dialect statement• arithmetic expressions (+, –, *, /, ÷, %, and

parentheses)• assignment statements• top-level methods like max and min.• minitest dialect and test-driven development• import statement• random module• string expressions (++, *, and parentheses)• string methods (as listed in standardGrace

documentation)• defining methods; returning values• method parameters• providing arguments with method requests• repeat loops• if, with else and elseif; if expressions as well

as if statements.• input function• print function• while loop using a simple (e.g., a single

Boolean variable) or complex condition• accumulator idiom (with a loop; initialize a

variable outside the loop; accumulate something using that variable inside the loop)

• for loop over a range• for loop over a string• simple Boolean expressions (<, ≤, ≥, >, ==, ≠)• complex Boolean expressions (and, or, not,

with parentheses)• lists, and operations on list objects• iterating over a list• subscripts with lists; lists as mapping from

index to value• list methods (as listed in the documentation,

probably a subset of these)• sets; using sets for duplicate removal• dictionaries as mappings from keys to values• dictionary methods (as listed in the

documentation)• complex data structures (lists in lists or

dictionaries in lists or dictionaries in lists, or dictionaries in dictionaries … requiring the use of two keys)

• if time permits: simple objects with their own methods

6

Page 7: Sit in the assigned area; introduce yourself to your group

Is this the class for me?• Goal: students who successfully complete the

class will have a good understanding of primitive data types, constants, variables, parameters, arguments, conditionals, loops, methods, and lists.

• If you have already written programs in some other language, you will probably be familiar with these concepts (or similar ones), and you should probably enroll in CS 162, and not in this class. ‣ For example, if you haven't programmed with lists, but have

programmed with arrays, you should take CS162 rather than this class.

7

Page 8: Sit in the assigned area; introduce yourself to your group

Will this class get me a job as a Programmer?

• No

• You are unlikely to learn enough about programming in a single quarter to be able to land a job as a programmer.‣ This is true regardless of the class, the

language, or the teacher. The goal of this class is to build a solid foundation for the remainder of the CS programming sequence, CS 162, CS 163, CS 201 and CS 202.

8

Page 9: Sit in the assigned area; introduce yourself to your group

Programming Assignments

• Can be completed by a pair of students‣ Both students hand it in, bearing both names

‣ Make sure that you both “drive”

• Homeworks due by midnight on Tuesday. ‣ On Thursday, I'll go though a solution in class,

and answer questions about the homework.

‣ Late homeworks will be accepted up until class time on Thursday, but no later.

9

Page 10: Sit in the assigned area; introduce yourself to your group

Grading

• Participation 5%

• Homeworks: points for completion 10%

• Proficiency demos: programming in front of a lab assistant or TA (weeks 3, 5 & 8) 15%

• Midterm exams (weeks 4 and 7) 30%

• Final Exam (week 11) 40%

10

Page 11: Sit in the assigned area; introduce yourself to your group

Facts of Life

• Learning to program is like learning to swim!

11

• Don’t let this be you

Page 12: Sit in the assigned area; introduce yourself to your group

Grace Logowww.cs.pdx.edu/~grace/doc/dialects/logo/

Page 13: Sit in the assigned area; introduce yourself to your group

Photos from http://cyberneticzoo.com/

The first “Turtle” — built by Tom Callahan, MIT, 1969–70

Seymour Papert (news.mit.edu)

Page 14: Sit in the assigned area; introduce yourself to your group

Image and text from Twenty Thing to Do with a Computer

by Seymour Papert and

Cynthia Solomon, June 1971

Page 15: Sit in the assigned area; introduce yourself to your group

https://www.youtube.com/watch?v=KeFhFPNO8hc

Page 16: Sit in the assigned area; introduce yourself to your group

https://www.youtube.com/watch?v=m4a0jcrDgK0

Page 17: Sit in the assigned area; introduce yourself to your group

Your turn

• Using dialect "logo"

• write a program to draw a rectangle

• Look at the logo dialect documentation

• Run it

• Change the rectangle so that the sides are in the golden ratio

17

Page 18: Sit in the assigned area; introduce yourself to your group

The Design Recipe1. Write down a purpose statement2. Write down a header3. Write some examples4. Take inventory5. Write the code6. Test the code7. Clean up

18