Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 203: Introduction to Computer Science I

Similar presentations


Presentation on theme: "CSCI 203: Introduction to Computer Science I"— Presentation transcript:

1 CSCI 203: Introduction to Computer Science I
Xiannong Meng Fall 2017 Notes are based on works by other professors.

2 Let’s get to know each other …
talk to me: Dana 212, me: learn about me: Google “Xiannong Meng” Fill out survey form before Wednesday’s class (l’ll it after the class)

3 What are the majors who are in this course?

4 UNDECIDED ACCOUNTING AND FINANCIAL MANAGEMENT MANAGEMENT BIOLOGY
CELL BIOLOGY COMPUTER SCIENCE ECON INTERNATIONAL RELATION MANAGEMENT MATH/ECON SPANISH/PSYCHOLOGY THEATRE/CREATEIVE WRITING UNDECIDED

5 What is “computer” or “computer science” as you know?

6 Describe “computer” or “computer science”
Grab a piece of paper. You have 2 minutes to write down 5 to 10 phrases, based on the following prompt: Describe “computer” or “computer science”

7 SHARE your writing with your neighbors (4-5 of you), agreeing on one prompt (‘computer’ or ‘computer science’), list top three phrases. All groups, SHARE them with class.

8 Our collective results?

9 CLASS LOGISTICS Course website: http://www.eg.bucknell.edu/~csci203
Course Moodle site:

10 COURSE STRUCTURE Sun Mon Tues Wed Thurs Fri Sat LABS DUE HW DUE LABS

11 HELP STRUCTURES We will have help sessions, announced soon.
Sun Mon Tues Wed Thurs Fri Sat LABS DUE HW DUE LABS We will have help sessions, announced soon. TLC study groups Come to my office hours! or call me.

12 Python Programming Python (language) and IDLE (editor)
Open-source, free from Available for Mac, Windows and Linux. Easy to install. Check out the “Resources” page from course website for instructions to install the software We will be using Python 3 be sure to get that version...

13 Demo "Editor" and "Shell" Editor (IDLE): typing code
Shell window: running code This is better demonstrated by simply firing up IDLE and giving a quick demo right in class Here, you can save and change programs. Hitting F5 runs your program over in the shell Here, you can try things out at the command prompt >>>

14 Lab 0 on Monday or Tuesday is to run and submit a similar program
A Python Program …then DOING! Test it out in Python Caveat… most problems we will work on in 203 can be handled by jumping right on the computer and trying it out… and that is OK, at this stage! Lab 0 on Monday or Tuesday is to run and submit a similar program

15 Writing in Python syntax semantics intent How it looks What it does
What it should do Syntax – determined by the language chosen Semantics – the meaning behind the written recipe (regardless of what you intended!) Intent – determined by you. We will strive to design solutions that match your intent!

16 Syntax – How it looks Punctuation? Spacing? Color information? Strings? Variables?

17 Python syntax highlights
for homework 0 assignment statements always read right-to-left and use ONE equals sign every block of code must line up!! comparisons use TWO equals signs colons begin a new block! Don’t print a space. Don’t go to next line. every block of code must line up!! a backslash shows special cases or characters flattering or flouting CS graders is encouraged! elif your test goes here: else: if your test goes here: as many as you want – zero or more – all mutually exclusive NO test – still needs a colon Like elif, it is optional Start "branching" True? Execute the block

18 Choices if score >= 93: print('A’) elif score >= 90: print('A-’)
if ... elif ... else if score >= 93: print('A’) elif score >= 90: print('A-’) elif score >= 60: print('Pass’) else: print('Aargh!’) mutually exclusive blocks Useful skill Important tool Window into corners of everyday life When using if .. elif .. elif .. else only one block of code will run: the first one whose condition is True


Download ppt "CSCI 203: Introduction to Computer Science I"

Similar presentations


Ads by Google