1 of 48

CS 101

Sneak Preview and Review

Lecture 25

2 of 48

CS Pre-Major

CSc 101

Intro to Computer Science

CSc 110

Intro to Computer Programming I

CSc 120

Intro to Computer Programming II

You are here

This is the intro course sequence for the CS department

3 of 48

CS Pre-Major

If you have a little bit of background, or do not but you want a “fast-paced” introduction, 110

CSc 101

Intro to Computer Science

CSc 110

Intro to Computer Programming I

CSc 120

Intro to Computer Programming II

Prerequisites:

College Algebra

4 of 48

CS Pre-Major

If you have significant CS background, or completed 110

CSc 101

Intro to Computer Science

CSc 110

Intro to Computer Programming I

CSc 120

Intro to Computer Programming II

Prerequisites:

CS 110 (or much exp)

5 of 48

CS Pre-Major

CSc 101

Intro to Computer Science

CSc 110

Intro to Computer Programming I

CSc 120

Intro to Computer Programming II

Prerequisites:

CS 110 (or much exp)

6 of 48

CSc 110

  • Intro to Computer Programming I
  • Differs from 101 in the following ways:
    • More focus of lecture/section on programming, design, etc
    • Python

7 of 48

CSc 110

  • Intro to Computer Programming I
  • Differs from 101 in the following ways:
    • More focus of lecture/section on programming, design, etc
    • Python
  • But there are some similarities . . .

8 of 48

Declaring variables

Processing

Python

int offset = 0;

�float grade = 0.28;�

String name = "Benjamin";��boolean skyBlue = true;

9 of 48

Declaring variables

Processing

Python

int offset = 0;

�float grade = 0.28;�

String name = "Benjamin";��boolean skyBlue = true;

offset = 0

�grade = 0.28�

name = "Benjamin"��skyBlue = True

10 of 48

Conditionals (if-statements)

Processing

Python

int score = 75;��if (score >= 90) {� println("You got an A!");�} else if (score >= 80) {� println("You got a B!");�} else {� println("C or lower");�}

11 of 48

Conditionals (if-statements)

Processing

Python

int score = 75;��if (score >= 90) {� println("You got an A!");�} else if (score >= 80) {� println("You got a B!");�} else {� println("C or lower");�}

score = 75��if score >= 90:� print("You got an A!")�elif score >= 80:� print("You got a B!")�else:� print("C or lower")

12 of 48

For-loops

Processing

Python

for (int i=0; i<100; i+=10) {� rect(i, 10, 8, 10);�}

13 of 48

For-loops

Processing

Python

for (int i=0; i<100; i+=10) {� rect(i, 10, 8, 10);�}

for i in range(0, 100, 10):� rect(i, 10, 8, 10)�

14 of 48

Functions

Processing

Python

void drawTarget(int x, int y) {

ellipse(x, y, 30, 30);

ellipse(x, y, 20, 20);

ellipse(x, y, 10, 10);

}

15 of 48

Functions

Processing

Python

void drawTarget(int x, int y) {

ellipse(x, y, 30, 30);

ellipse(x, y, 20, 20);

ellipse(x, y, 10, 10);

}

def drawTarget(x, y):

ellipse(x, y, 30, 30)

ellipse(x, y, 20, 20)

ellipse(x, y, 10, 10)

16 of 48

Other 110 topics

  • While-loops
  • Function return-values
  • File input / output
  • Data structures, including:
    • Lists, dictionaries, sets
  • Searching and sorting

17 of 48

101 Final Exam

  • Will be cumulative
  • More of an emphasis on 2nd-half of semester topics
  • Use slides, section, quizzes, exams, and review sheets for studying

18 of 48

101 Final Exam

  • Will be cumulative
  • More of an emphasis on 2nd-half of semester topics
  • Use slides, section, quizzes, exams, and review sheets for studying
  • “I need to get X on the final to get a Y in the class”
    • You can check and compute your grade with D2L
    • If you need help, check with me or an SL

19 of 48

Future Section Leaders?

  • All of the CS intro courses have section leaders
    • 101, 110, 120
  • SLs are students who have proven to be good at computer science, and good at helping others!

20 of 48

Future Section Leaders?

  • All of the CS intro courses have section leaders
    • 101, 110, 120
  • SLs are students who have proven to be good at computer science, and good at helping others!
  • However, you do need to finish CSc 120 before becoming one
  • So, in a year from now, apply to be one if interested!

21 of 48

Materials

  • Required Materials
    • STUDY FOR THE FINAL

22 of 48

Materials

  • Required Materials
    • STUDY FOR THE FINAL

23 of 48

Review

24 of 48

Problem Solving

  • What is our “running definition” of computer science?

25 of 48

Problem Solving

  • What is our “running definition” of computer science?
    • The process of finding solutions to difficult or complex issues by defining a set of steps or instructions to be run by a computer for accomplishing a particular task

26 of 48

Problem Solving

  • What is our “running definition” of computer science?
    • The process of finding solutions to difficult or complex issues by defining a set of steps or instructions to be run by a computer for accomplishing a particular task
  • What do we call a detailed sequence of steps used to solve a problem?

27 of 48

Problem Solving

  • What is our “running definition” of computer science?
    • The process of finding solutions to difficult or complex issues by defining a set of steps or instructions to be run by a computer for accomplishing a particular task
  • What do we call a detailed sequence of steps used to solve a problem?
  • How did we write algorithms? (2 ways)

28 of 48

Representing Information

  • On a computer, all there is to store information are 1s and 0s
  • Need a way to store and interpret information

29 of 48

Representing Information

  • On a computer, all there is to store information are 1s and 0s
  • Need a way to store and interpret information
  • How is text stored on a computer?

30 of 48

Representing Information

  • On a computer, all there is to store information are 1s and 0s
  • Need a way to store and interpret information
  • How is text stored on a computer?
  • How are images stored?

31 of 48

Representing Information

  • On a computer, all there is to store information are 1s and 0s
  • Need a way to store and interpret information
  • How is text stored on a computer?
  • How are images stored?

32 of 48

Computer Dissection

  • Recall: The in-class computer build!
  • Studied the purpose, usage, and interactivity between the various components of the computer

33 of 48

Computer Dissection

  • Recall: The in-class computer build!
  • Studied the purpose, usage, and interactivity between the various components of the computer
  • Which components can you remember?
    • What does it do?
    • What other components does it communicate with?

34 of 48

Computer Networking

  • What are the main components of a network?

35 of 48

Computer Networking

  • What are the main components of a network?
  • How are devices on a local network typically connected?

36 of 48

Computer Networking

  • What are the main components of a network?
  • How are devices on a local network typically connected?
  • How do we represent a network visually?

37 of 48

Computer Networking

  • What are the main components of a network?
  • How are devices on a local network typically connected?
  • How do we represent a network visually?
  • How are devices addressed on a computer network?

38 of 48

Internet and HTML

  • What is “the internet” ?

39 of 48

Internet and HTML

  • What is “the internet” ?
  • What is a URL?

40 of 48

Internet and HTML

  • What is “the internet” ?
  • What is a URL?
  • What are the various components of a URL?

41 of 48

Internet and HTML

  • What is “the internet” ?
  • What is a URL?
  • What are the various components of a URL?
  • How are web pages built?
    • What tags are used?

42 of 48

Security

  • What are the three aspects of keeping a resource secure?

43 of 48

Security

  • What are the three aspects of keeping a resource secure?

44 of 48

Security

  • What are the three aspects of keeping a resource secure?
  • Common attacks that malicious users attempt are . . .

45 of 48

Security

  • What are the three aspects of keeping a resource secure?
  • Common attacks that malicious users attempt are . . .
  • What is Malware?

46 of 48

Cryptography

  • What are some of the simple ciphers we used?

47 of 48

Cryptography

  • What are some of the simple ciphers we used?
  • What are the two types of common modern cryptography?

48 of 48

Cryptography

  • What are some of the simple ciphers we used?
  • What are the two types of common modern cryptography?
  • How do each of them work?