a) Write a Python program to print the integers (whole numbers) from 10 to 20, inclusive, using a loop.
for i in range(10,21): print i
b) Write a Python program to prompt the user for their name and then say "hello" using their name (e.g. "Hello, Alan").
print "What is your name?" name = raw_input() print "Hello,", name
c) What does the following Python program output?
x = 3 y = x + x y = y + y y = x + y print y
15
d) What does the following Python program output?
x = 2 while x < 30: x = x * 5 print x
50
e) What does the following Python program output?
for i in range(2,5): print 'z' * i
zz zzz zzzz