numb = input("Enter a number") #user input
print 'numb<10 is',int(numb < 10)
print 'numb>10 is',int(numb > 10)
print 'numb==10 is',int(numb == 10),'\n'
a=input( 'Please Enter two numbers, a: ') #takes input
b=input('b: ')
if a>b: #prints which is greater
print a,
print 'is greater'
print b,
print 'is smaller'
a=input('Please Enter two numbers, a: ') #takes input
b=input('b: ')
if a>b:
print a,
print 'is greater'
print b,
print 'is smaller'
else:
print b,
print 'is greater'
print a,
print 'is smaller'
print 'Enter three number, a, b, c:' #user input
a = input()
b = input()
c = input()
if a==b:
if b==c:
print 'a, b, and c are equal\n'
else:
print 'a and b are different\n'
marks=input('Please input the marks obtained out of 100: ') #user input
if marks>=0 and marks<=100: #prints grade according to marks
range=marks / 10
print 'Equivalent letter Grade Award is : ',
if range<=10 and range>=8:
print ' A'
elif range<8 and range>=7:
print ' B'
elif range<7 and range>=6:
print ' C'
elif range<6:
print ' D'
else:
print 'Incorrect range: '
print 'Marks should be within 0 to 100'
count=input('Enter the value of count: ')
while count>0: #while loop
print 'count=',count
count-=1
print 'done'
count=input('Enter the value of count: ')
#no do while loop in python
while True:
print 'count=',count
count-=1
if count==0: #fail condition
break
print 'done'
for i in range(15):
print i*i, #displaying
count=input('Enter the value of count: ') #user input
for x in range(count): #for loop
print 'count=',count
count-=1
print 'done'
print 'count up'
for i in range(5): #for loop
print i
print 'count down'
i+=1
for i in range(5,-1,-1):
print i
print 'done'
for i in range(5):
print i #displaying
count=input('Enter the value of count: ') #user input
while True: #while loop
if count<=0:
break
print 'count= ',count
count-=1
print 'done'
count1 = input("Enter the value of count: ") #user input
for count1 in range(count1,0,-1):
if count1 == 3:
continue
print 'count =',count1
print 'done'