print "Integers that can be divided by both 2 and 3"
print "(within the range of 0 to 100):"
for i in range(0,100):
if i%2==0 and i%3==0:
print " ",i
print "Even Number Odd Number"
for i in range(0,10):
if(i%2==0):
print i,
else:
print "{:14d}".format(i)
for i in range(-5,6):
if i>0:
if i%2==0:
print "{:d} is an even number.".format(i)
else:
print "{:d} is an odd number.".format(i)
elif i==0:
print "The number is zero."
else:
print "Negative number:",i
day=raw_input("Please enter a sigle digit for a day\n(within the range of 1 to 3:)")
if day=='1':
print "Day 1"
elif day=='2':
print "Day 2"
elif day=='3':
print "Day 3"
#This program is specially used to understand the "break" statement in switch..case.
#But in python we can't use break statement outside of the loop so break is not written with each if block.
day=raw_input("Please enter a sigle digit for a day\n(within the range of 1 to 7:)")
if day=='1':
print "Day 1 is Sunday"
elif day=='2':
print "Day 2 is Monday"
elif day=='3':
print "Day 3 is Tuesday"
elif day=='4':
print "Day 4 is Wednesday"
elif day=='5':
print "Day 5 is Thursday"
elif day=='6':
print "Day 6 is Friday"
elif day=='7':
print "Day 7 is Saturday"
else:
print "The digit is not within the range of 1 to 7"
print "Enter a character:\n (enter X to exit)\n"
while 1:
c=raw_input()
if c=='x':
break
print "Break the infinite loop. Bye!"
sum=0
for i in range(1,8):
if i==3 or i==5:
continue
sum=sum+i
print "The sum of 1,2,4,6, and 7 is:",sum