CPSC 110; September 8, 2009


Go Over dates for HW


Answer some questions you sent in


Will I survive this class knowing hardly anything about how to use computers or what anything means?

You probably will survive. The course has no prerequisites, but people often take this course because they have an interest in the topic You do need to remember the statements about doing well in CS courses. Take another look at https://docs.google.com/present/edit?id=0AW1VQ3vzgRRxZGRtbWh4c25fNDQ0ZzM3OTVjZGo&hl=en

Am I okay to take this class with no prior experience with computer programming?

Sure. There are no prerequisites. We will be programming using Python. It is a good language to start with. You might want to take a look at some of the resources at BeginnersGuide-PythonInfo Wiki


Do programming languages differ on different operating systems?

The languages don't differ that much. The idea was to define a language so it would be the same on all operating systems and processors. That way programs could be written once and then be portable, transportable.



A little bit about Python.

You typed in the chaos program.


# File: chaos.py
# A simpe program illustrating chaotic behavior

def main():
		print("This program illustrates a chaotic function")
		x = eval(input("Enter a number between 0 and 1: "))
		for i in range(10):
			x = 3.9*x*(1 - x)
			print (x)


main()

Python Pointers:

We start with

	def main():

and then indent



Indenting is important in Python, and indicates that items are under a controlling statement.

Controlling by concept as in

 def main():

But also controlling as in an action

as in

	for i in range(10):

Upper and lower case are interpreted differently.

We need to learn the syntax

How to write the statements. For example

 for <identifier> in range( <a number>):

We need to learn the semantics

What the statements mean. For example,

for temperature in range(20): 
distance = rate * time
x = x + 1

That way we can experience manipulating symbols to solve problems, to get the machine to do what we want it to do!

Get a programming buddy.