But really, understanding the solutions below is much less useful than doing the work yourself. Solving the sample test questions yourself is the preparation I recommend for the test. Reading my sample solutions is not something I recommend.
I think that the following are right, but please let me know if you think I made a mistake...
for x in ['like', 'dislike', 'am indifferent to']: print 'I', x, 'cheese'
for i in range(10): if i != 5: print i
4. see the programs written in lecture in unit V, especially 1hms.py.
i = 1 while i*i <= 1000: i = i + 1 print i*i