Difference between revisions of "IB Computer Science I"

From WLCS
Line 2: Line 2:
 
'''Warmup:'''
 
'''Warmup:'''
 
* Describe in three words what you did over winter break
 
* Describe in three words what you did over winter break
 +
* Assume you have the following code:
 +
 +
<source lang="python">
 +
i = 0
 +
n = 0
 +
while n < 90:
 +
  i = 0
 +
  while i < 10:
 +
    n += 3
 +
    if n > 50:
 +
      break
 +
    i += 1
 +
  n += 1
 +
</source>
 +
 +
* What is the value of ''n'' after the above code executes?  DO NOT USE YOUR COMPUTER.
  
 
'''Agenda:'''
 
'''Agenda:'''

Revision as of 14:15, 5 January 2009

Monday (1/5/09)

Warmup:

  • Describe in three words what you did over winter break
  • Assume you have the following code:
i = 0
n = 0
while n < 90:
  i = 0
  while i < 10:
    n += 3
    if n > 50:
      break
    i += 1
  n += 1
  • What is the value of n after the above code executes? DO NOT USE YOUR COMPUTER.

Agenda:

Archives