COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

17
COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1

Transcript of COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Page 1: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

COSC 235: Programming and Problem Solving

Chapter 1: The magic of PythonInstructor: Dr. X

1

Page 2: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

How to get help

• Visit me during office hours or setup an appointment

• Visit Lykes @ Olin 112 A, Sun-Thurs 6:30 pm – 8:30 pm

• Use Piazza for your questions• Code early and often!!

2

Page 3: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

3

How to get help

Page 4: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Topics

• What is Computer Science?• What do Computer Scientists:– Study– Do

• What is hardware?• What is software?• What is a programming language?• What is the difference between compilers

and interpreters?• Programming: How does chaos work?

4

Page 5: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

5

What is computer science?

• “Computers are to computer science what telescopes are to astronomy.” –E. Dijkstra

• The study of what can be computed• Computer scientists… (what do they do, what

do they look like?)

Page 6: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

http://services.allegany.edu/acmlife/?page_id=2065

6

Page 7: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

The Universal Machine

• “a machine that stores and manipulates information under the control of a changeable program.”

• Two key elements:– Manipulating information… data!– Changeable program

Page 8: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

The Universal Machine

• What is a computer program?

8

Page 9: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Program Power

http://www.theworkprint.com/

jubilee-joins-x-men-apocalypse/123

9

Page 10: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Why do you want to learn how to code?

10

Page 11: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Hardware

11

CPU

Main Memory

Input Devices

Output Devices

Secondary Memory

Page 12: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Software

• Applications vs Programs? What is the difference?

• Programming languages– High level vs low level– Compiled vs Interpreted

12

Page 13: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Low vs High Level languages

• Assembly

• Which high level languages do you know?

13

Page 14: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Compiled languages

14

http://www.csee.umbc.edu/courses/201/fall09/lectures/intro_2.html#(1)

Page 15: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

Interpreted Languages

15

http://www.csee.umbc.edu/courses/201/spring10/lectures/intro_2.html

Page 16: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

The Magic of Python

16

http://mediaroom.scholastic.com/harrypotter

https://www.python.org/

Page 17: COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.

References

• “Python Programming: An Introduction to Computer Science”, 2nd ed., John M. Zelle

17