|
|
Line 1: |
Line 1: |
− | == Tuesday (11/23/10) == | + | == [[IBCS1 - Archives]] == |
− | '''Agenda:'''
| |
− | * [[Looping Exercises]]
| |
− | * [[Looping with GASP Exercises]]
| |
− | * Turkey Exercise
| |
− | ** You will be using GASP to draw turkeys all over the screen
| |
− | ** Define a turkey(x,y) function that draws a turkey at a particular location (HINT: It helps to be able to draw a turkey in the lower left, and then generalize it to draw at (x,y))
| |
− | ** Using a loop, draw 50 random turkeys all over your screen
| |
− | * Read and work through [http://www.openbookproject.net/thinkcs/python/english2e/ch08.html Case Study: Catch]
| |
− | | |
− | == Friday (11/19/10) ==
| |
− | '''Warmup:'''
| |
− | * Take out scratch paper and work out the Fibonacci sequence
| |
− | * Assign variables to the first two numbers
| |
− | * ...how do you calculate the third number?
| |
− | * What should happen next?
| |
− | | |
− | '''Agenda:'''
| |
− | * [[Looping Exercises]]
| |
− | * [[Looping with GASP Exercises]]
| |
− | | |
− | == Wednesday (11/17/10) ==
| |
− | '''Warmup:'''
| |
− | * Assume you have the following code:
| |
− | <syntaxhighlight lang="Python" line>
| |
− | i = 0
| |
− | while i < 10:
| |
− | print "All work and no play makes Jack a dull boy."
| |
− | i = i + 1
| |
− | </syntaxhighlight>
| |
− | * What is the counter variable?
| |
− | * What is the condition of the loop? (i.e. when does it end?)
| |
− | | |
− | '''Agenda:'''
| |
− | * [[Print Shapes Exercises]]
| |
− | * [[Looping Exercises]]
| |
− | | |
− | == Monday (11/15/10) ==
| |
− | '''Warmup:'''
| |
− | * Assume you have the following code:
| |
− | | |
− | <syntaxhighlight lang="Python" line>
| |
− | a = 0
| |
− | b = 1
| |
− | c = 0
| |
− | a = a + 1
| |
− | c = c + 1
| |
− | b = a * c
| |
− | c = c + 1
| |
− | </syntaxhighlight>
| |
− | | |
− | * What are the final values of a, b, and c?
| |
− | | |
− | '''Agenda:'''
| |
− | * Introduction to Iteration (looping)
| |
− | ** while loops
| |
− | ** counter variables
| |
− | * Looping practice
| |
− | ** Print out all the numbers from 0-50
| |
− | ** Print out all the numbers from 75 down to 25
| |
− | ** Write a loop that prints out the first 100 even numbers
| |
− | ** Prompt the user for a number and store it in a variable n, then print out the first n odd numbers (starting at 1) using a loop
| |
− | ** Print out all the numbers that are divisible by 6 from 0 through 100
| |
− | * [[Guessing Game Assignment]]
| |
− | | |
− | == Wednesday (11/10/10) == | |
− | '''Warmup:'''
| |
− | * Complete the HTTLACS: Ch 5 exercises and demo to Mr. Bui
| |
− | | |
− | '''Agenda:'''
| |
− | * Introduction to GASP
| |
− | * Creating useful functions
| |
− | | |
− | == Monday (11/8/10) ==
| |
− | '''Warmup:'''
| |
− | # Prompt the user to enter a decimal (float) number and store in variable '''x'''
| |
− | # print int(x)
| |
− | # print round(x)
| |
− | # Test out your program using several numbers (e.g. 3.2, 4.5, 5.9)
| |
− | # What do you think the '''int()''' and '''round()''' functions do?
| |
− | | |
− | '''Agenda:'''
| |
− | * Review '''return'''
| |
− | * Review doctests
| |
− | * Complete the exercises at the end of [http://openbookproject.net/thinkCSpy/ch05.html HTTLACS: Ch 5] (w/ doctests)
| |
− | | |
− | == Thursday (11/4/10) ==
| |
− | '''Warmup:'''
| |
− | * Define a function named slope(x1, y1, x2, y2) that takes the four listed parameters
| |
− | * Calculate the slope and store it in a variable '''m'''
| |
− | * print m
| |
− | | |
− | '''Agenda:'''
| |
− | * Return and go over 1st Quarter Exam
| |
− | * Re-introduction to Functions
| |
− | ** '''return''' keyword
| |
− | ** doctests
| |
− | * [http://openbookproject.net/thinkCSpy/ch05.html HTTLACS: Ch 5]
| |
− | * Complete the exercises at the end of Chapter 5 (w/ doctests)
| |
− | | |
− | == Monday (11/1/10) ==
| |
− | '''Warmup:'''
| |
− | * Prompt the user to enter his/her grade (0-100)
| |
− | * Using if statements, do the following:
| |
− | ** if the grade is greater than or equal to 90, then print "You have an A"
| |
− | ** if the grade is less than 90 '''and''' the grade is greater than or equal to 80, then print "You have a B"
| |
− | ** if the grade is less than 80 '''and''' the grade is greater than or equal to 70, then print "You have a C"
| |
− | ** if the grade is less than 70 '''and''' the grade is greater than or equal to 60, then print "You have a D"
| |
− | ** if the grade is less than 60, then print "You have an E"
| |
− | | |
− | '''Agenda:'''
| |
− | * Demo [[Geek Flow Chart Assignment]] today
| |
− | * Go to [http://openbookproject.net/thinkCSpy/ch04.html HTTLACS: Ch 4] and read section 4.11: GASP
| |
− | * Try out the GASP code to see if it works
| |
− | * Try to draw a stick figure
| |
− | | |
− | == Archives ==
| |
− | * [[IBCS1 - 1011 - October]]
| |
− | * [[IBCS1 - 1011 - September]]
| |