Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 171: Principles of Computer Science I John Barr.

Similar presentations


Presentation on theme: "COMP 171: Principles of Computer Science I John Barr."— Presentation transcript:

1 COMP 171: Principles of Computer Science I John Barr

2 What is Computer Science? Problem Solving  Understanding the problem/challenge  Breaking down the problem into solvable pieces  Using the tools you have to solve the problem

3 What is Computer Science? Solution: An Algorithm  Step-by-step procedure to solve the problem from beginning (start state) to end (end state)

4 What is Computer Science? For CS, algorithms need to be expressed in a form the computer can understand. Programming Language  Your way to tell the computer your algorithm (your solution)  Computer will only do what you tell it to do

5 Our Programming Language: Python - Version 3.x Powerful, but easy to use Interpreted Language (not compiled)  Simple syntax  Runs immediately (but slightly slower) Allows for Rapid Prototyping

6 Our Course Learn to solve problems with computers by creating algorithms, and translating those algorithms in Python code. Give the computer instructions to solve instances of the problem for us.

7 Typical Weekly Schedule MTUWTHFSASU New TopicNew Lab Deeper into new topic Extra challenge Working on labReading / Working on Homework Homework Due Lab due Quiz Our Course

8 Sakai for Class Information Syllabus Textbook Assignments TA hours Class web site Other resources Start Python download now…  Python 3.x

9 Our Book / Homework System Interactive Python, by Runestone Interactive  Google “Interactive Python”  To create an account, scroll to the very bottom of this page, and click the small blue "register" link.  The course name is: IC-Comp-17-FA-14 After, submit your username on Sakai

10 Starting with Python - IDLE The environment we will use to create and run python programs Very simple Downloads with python

11 IDLE: Using the shell >>> 2+2 4 >>> print "Hello, World" Hello, World Tinkering in the shell is fine, but when you want to maintain / save / share your work, use a module.

12 Creating a module print “Running Module” def main(): #comment inside module print ("Hello, World”) main() Select “Run > Run Module” (save the file as “HelloWorld”) A shell will open up with your program loaded In IDLE: Select “File -> New Window” or “File->New File” on a Mac This new window is a “module” Type the following:


Download ppt "COMP 171: Principles of Computer Science I John Barr."

Similar presentations


Ads by Google