from compiler.ast import Print
a=5%2.2
print(a)
a=a+1
print(a)
 
c=abs(-5)
c= str(pow(5,2))
print(c)
import math
 
d=math.floor(18.9)
print(d)
anshul= math.floor
c=str(anshul(12.6))
print(c)
b="chawla"
print(a+b)
print(a,b)
print(a+b+c)
 
num2 = 32
print (a+`num2`)
#raw_input() #treats user input as string
 
 
f=['0','1','2','3','4','5','6']
print("HERE {}".format(f[::5]))
from compiler.ast import Print
 
 
myList = [0,1,2,3,4,5,6,7,8,9]
print(myList)
print(myList[0])
print(myList[:])
print(myList[0:5])
print(myList[1:5])
print(myList[::])
print(myList[-6:-1])
print(myList[0:5:2])
print(myList[-1:-6:-2])
print(myList[::-1])
myList10= myList*10
print(myList10)
print("anshul"+ " chawla")
 
a="anshul "
b=12
print(a+str(b))
 
print([10]*10)
 
print('an' in a )
print(9 in myList)
myList1=['x','a','b','c','d']
 
print(len(myList1))
print(max(myList1))
print(min(myList1))
print(list('anshul'))
myList1[1]='z'
print(myList1)
del(myList1[0])
print(myList1)
 
 
 
myList1[4:]="supp"
print(myList1)
 
myList1[1:1]="00000"
print(myList1) 
 
myList1[1:6]=[]
print(myList1) 
 
 
a=[1,2,3]
b=[4,5,6]
a.extend(b)
print(a) 
a.reverse()
print(a)
print(a.index(4)) 
print(a.pop(2)) 
print(a.remove(2))
a.sort()
print(a) 
 
print(sorted("Anshul")) 
 
a="hey s, how is your s"
b=("anshul","python")
print(a%b)

print(a.find("your"))
print(a.upper())
 
 b1=book={'Dad':'papa', 'Mom':'maa', 'Bro':'bhai'}
 print(book['Dad'])
 #book.clear()
 print(book)
 book1=book.copy()
 print(book.has_key('Mom')) 
 print(book.get('Dad'))
 #print(book.pop('Dad'))
 print(book)
 print(book.setdefault('Mom'))
print(book.) 

if book.get('Mom')=='maa1':
    print('its there')
elif book.get("Bro")=='bhai1':
    print('its elif')
else:
    print('in else')    
         
 
print (b1 is book) 
print('p' in book.get('Dad'))
 
print("dog">"cat")
 
b=1
while b<=10:
    print(b)
    b+=1
 
a=['1','2','3','4','5']
for num in a:
    print("value is "+ num)
b={'Dad':'papa', 'Mom':'maa', 'Bro':'bhai'}
print(b)
for name in b:
   print(b[name]) 
       
b=1;
while 1:
   print(b)
   b+=1
   if b==5: 
       break
    
    name= raw_input('Enter:')
    if name=='quit': break
    print(name)
    
 
def testFunction(x):
   return 'test function value: '+x
print(testFunction("Sachit"))
    
    
def add(x,y):
   return str(x)+str(y)
 
 
print(add('a',20))  
 
 
def name(first, last): 
   print('{} -- {}' .format(first, last))
 
name("anshul","chawla") 
 
def functionList(num,*f):
   print(num,f)
    
functionList("aaa","anshul","chawla","supp")     
 
 
def cart(*item,**i):
   print(item)
tuna=(1,2,3)
   
   
def temp(**t):
   print(t)
   return None

temp(**b)
 
    
    
        
     
cart(a=1,b=2,c=3)
 
 
 import tempClass
 
 tempClass.myFunction("name")
 print("4444")
 reload(tempClass)
 #o= tempClass.parentClass1()
 tempClass.myFunction("name")
 
import math
 
print(help(math.__name__))
 
for i in range(1,10,2):
    print("{}".format(i))



