Jump to content

User:Sdudah/python

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sdudah (talk | contribs) at 08:12, 9 April 2007 (begin). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Computer Programming Lesson Plan

Goals

- Learn how to program the computer - Be a free opensource community member

Objectives

- Learn what a flowchart is - How to make a flowchart for writing programs - Learn some basic progrfaming constructs:If,While,For, Functions - Learn basic Python programming

---

Variable: What is a variable? x,count Q: share students by thinking of other examples: z, first-name, school,person

differnces name=Fawzi (assignemnt, not equality) Q: ask students for examples


FLOWCHART If you heard of flowcharting, why would you use a flowchart for? - you do not need a programming language to "write down" a program. You visually write a program. - Helps you get the big picture. - you can add details any time later. - Visual, understand the problem better. You can see missing points. - Translate the flowchart into a program (think of pseudocode). - Translate the floechart into any programming language (abstraction).

Essential components of a basic flowchart: START, END, INPUT, OUTPUT, PROCESS and DECISION.

Example of a flowchart:

Flowchart exercise: Make a simple flow chart to/for

Flowcontrol/Intelligence: IF STATEMENT What Makes Computers look intelligent? Ex:

Looping: While/For to execute commands Ex:


Divide and conquer: Functions Think of them as <Jinnies> (or nano computers inside computers)

What are they? subprograms (subcode)

How do tey work? - Give them orders - they go process, cook, crunch... (in a bit of time) - Give you the stuff back

What are the good for? - Make large programs easier (split them) - Team work (several users work on different parts) - debugging (fix bugs) - other


Questions:

- Write three computer programming languages you know or heard of? Ex: C, C++, Java, Python

- With the goal of promoting free opensource community, what would you (currently) do to learn a new

programming language?

Possible answers: 0- Free opensource OS, Linux (recommended) 1- Free Book/Tutorials. Ex:Wikibooks project), 2- Free opensource compiler Ex: www.python.org 3- Free opensource editor. Ex: Emacs, Eclipse, etc 4- Programming language Newsgroup/Language-specific Mailing list. Ex: comp.lang.python 5- Participate in a community project. Ex: coding. Others (documentation, report bugs, donate,

promote). 6- Programming contest (if you have previous programming experience) Ex: Google summer code contest.

Get hired?


Feedback: (you can submit answers to the follwoing questions electronically on the course website with

the case-sensitive password:I.lovE.PyThOn) - What did you like to know more about that was covered today? - What is it that you felt was not clear today? be specific and give exmaples where possible? - Is there something that you wish be covered? - From a scale of 1-5, how would you rate the lab session? - Comments: any positive criticism that would help make future lab sessions better?

Resources: Course Slides Examples, past projects Assignments/Projects Useful links