HW due Tuesday, September 8, 2009. View and write about the video "Introducing Python." due Tuesday, September 8, 2009. Remember, no handwritten work accepted. Download the document, write your answers using word processing software, and then send the completed assignment as an attachment to an email to ernestackermann AT acm.org replace At with @ and delete spaces
HW Due Thursday September 10, 2009. Answer the items in Questions2 online.
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.
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()
def main():
and then indent
Controlling by concept as in
def main():
But also controlling as in an action
as in
for i in range(10):
How to write the statements. For example
for <identifier> in range( <a number>):
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!
Go to lab and change the chaos program so that 200 numbers are printed rather than 10.
Modify the chaos program so that the number of values to print is determined by the user. You will have to add a line near the top of the program to get another value fro the user:
n = eval (input(" How many numbers should I print?: ")
Then you will need to change the loop to use n instead of a specific number.
Modify the chaos program so that only the final value is displayed. The final value is the only value that is displayed.