CDAT - Computer Science‎ > ‎2015-16‎ > ‎CSP‎ > ‎News and Assignments‎ > ‎

18 & 21 SEP

posted Sep 18, 2015, 3:33 AM by Tom Culpepper   [ updated Sep 21, 2015, 9:43 AM ]

Make sure you have filled out this form for the current project if you are a 9th or 10th grader in CDAT.

0)  Look at the code below.  It should loop through all the elements of the array and look for spaces.  It is not working the way we wanted it to.  What mistake(s) has/have been made?  You may need to look up what the function len() does in Python.

someString = raw_input("type something, but don't use the space bar.")
i = 0
while i < len(someString):
  i = i + 1
  if someString[i] == ' ':
    print "You put a space at spot number", i, "in the string.  I told you don't touch the the space bar!"

1)  Talk about quiz results

2)  Work on code academy.  You should finish the lesson about Booleans.

3)  Work on CDAT academy project (non-CDAT students and 11/12 graders - we'll talk).