#Assignment for week 2

#1) Sum all the numbers containing a '9' between 0-50 and 100-150, non-inclusive (meaning, the upper bound of each range is not included).
print sum([num for num in range (50) if '9' in str(num)]) + sum([num2 for num2 in range (100,150) if '9' in str(num2)])


#2) Fizz Buzz
#Write a program that prints the numbers from 1 to 100. 
#But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". 
#For numbers which are multiples of both three and five print "FizzBuzz".
for num3 in range (1,101):
	if num3 % 3 == 0 and num3 % 5 == 0:
		print "FizzBuzz"
	elif num3 % 3 ==  0:
		print "Fizz"
	elif num3 % 5 == 0:
		print "Buzz"
	else:
		print num3
		
