Wednesday, December 30, 2020

 

  ADC value

Sunday, December 27, 2020

python day 19 classes

 # -*- coding: utf-8 -*-

"""

Created on Mon Dec 28 07:41:21 2020

day 19

topic : class


@author: anil durgam


class praveen():

    pass


praveen()



class praveen():

    print("praveen rocks!!!")


p=praveen()

print(p)


class praveen():

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    print("praveen rocks!!!")

    


p=praveen()

print(p)


class praveen():

    x=10

    print(x)

    


p=praveen()

print(p)


class praveen():

    x=10

    #print(x)

    


p=praveen()

#print("printx ",p.x)

a=p.x

print("a",id(a))


z=praveen()

b=z.x

print("b=:",id(b))


class praveen():

    x=10

    #print(x)

    


p=praveen()

print("printx ",p.x)

p.x=20

print("printx ",p.x)


class praveen():

    x=10

    #print(x)

    


p=praveen()

print("printx ",p.x)

p.x=20

print("printx ",p.x)


p.x=500

print("printx ",p.x)


class student():

    name="rakesh"

    lastname="daggubati"

    a=10

    b=20

    c=30

    

p=student()

print(p.name)

print(p.lastname)

print(p.a)

print(p.b)

print(p.c)


class student():

    name="rakesh"

    lastname="daggubati"

    a=10

    b=20

    c=30

    

p=student()

print(id(p))

print(id(p.name))

print(id(p.lastname))

print(id(p.a))

print(id(p.b))

print(id(p.c))


class student():

    name="rakesh"

    lastname="daggubati"

    a=10

    b=20

    c=30

    

p=student()

print(type(p.name))

print(type(p.a))


class student():

    name="rakesh"

    lastname="daggubati"

    a=10

    b=20

    c=30

    

student()

print(student.a)

"""

class student():

    def __init__(self):

        name="rakesh"

        print(name)

    

    

student()

print(student)


    





Friday, December 25, 2020

python day 18 files

 # -*- coding: utf-8 -*-

"""

Created on Sat Dec 26 07:42:27 2020

 topic: files

@author: anil



f = open("file1.txt")

print(f)



f = open("file1.txt")

print(type(f))


f = open("day_17.py",'r')

print(f.read())


import os


f = open("day_17.py",'r')

print(f.read())




f = open("file1.txt", "r")

print(f.read(15))


f = open("file1.txt", "r")

print(f.readline())

f.close()


f = open("file1.txt", "r")

print(f.readline())

f.close()







f = open("file1.txt", "r")

print(f.read())


f = open("file1.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file1.txt", "r")

print(f.read())




f.close()



f = open("file1.txt", "r")

print(f.read())


f = open("file1.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file1.txt", "r")

print(f.read())






f = open("file5.txt", "a")

f.write("\nPraveen is thurum!!!!")

f = open("file5.txt", "a")

f.write("\nPraveen is thopu!!!!")


f = open("file5.txt", "r")

print(f.read())

f.close()



import os

os.remove("file5.txt")

"""

import os


file = "a.mp3"

os.system(file)


Wednesday, December 23, 2020

python day 17 lambda

 # -*- coding: utf-8 -*-

"""

Created on Thu Dec 24 07:39:48 2020

day:17

topic: lambda

@author: anil


def x_fn(a):

    print(a+10)

    

x_fn(25)



x = lambda a : a + 10


print(x(25))



lambda a : a + 10


a=lambda a : 5 + 10



print(a(5))




a=lambda a : a + 10


print(a(5))


a=lambda a : a + 10


print(a(5))




a=lambda a,b : a * b


print(a(5,6))


a=lambda a,b,c : (a * b)+c


print(a(5,6,7))



a=lambda a,b,c : (a * b * c)


print(a(5,6,7))





a=lambda a,b,c,d,e,f,g : a * b * c+d-e/f%g


print(a(5,6,7,5,5,5,5))



a=lambda a,b,c,d,e,f,g : a * b * c+d-e/f%g


print(a(5,6,7))



cars = ["Ford", "Volvo", "BMW"]

print(cars)

print(type(cars))



fruits = ['apple', 'banana', 'cherry']


x = fruits.index("cherry")


print(x)

x = fruits.index("banana")

print(x)



#pass by value 

#pass by reference


def BMW_function(a):

    print(a)

    

    

b=(15*120)

BMW_function(b)




def BMW_function(a):

    print(a)

    

    

b=10

BMW_function(15*150)

BMW_function(15*150)

BMW_function(15*120)

BMW_function(15*120)

BMW_function(15*120)

BMW_function(15*120)

BMW_function(15*120)



def BMW_function(a):

    print(a)

    

    

b=10*17*16*6237*73246*167*5454*12

BMW_function(b)

BMW_function(b)

BMW_function(b)

BMW_function(b)

BMW_function(b)

BMW_function(b)

BMW_function(b)





def BMW_function(a):

    print("a:",a)

    


print(a)


    


if __name__ == '__main__' :

    b=10

    BMW_function(b)

    print(b)

    


global a


def brother_function(b):

    print("a:",a)

    


def small_brother_function(c):

    print("a:",a)

    

def sister_function(d):

    print("a:",a)

    

    


if __name__ == '__main__' :

    a=10

    sister_function(a)

    small_brother_function(a)

    brother_function(a)

    print(a)

    

"""

global a


def brother_function(b):

    

    

   

    print("a:",a)

    


def small_brother_function(c):

    

    print("a:",a)

    

def sister_function(d):

    

    print("a:",a)

    

    


if __name__ == '__main__' :

    

    a=10

    sister_function(a)

    small_brother_function(a)

    brother_function(a)

    print(a)

    

    




















    

    


Tuesday, December 22, 2020

python day 16 functions

 # -*- coding: utf-8 -*-

"""

Created on Wed Dec 23 07:27:55 2020

day :16

session: functions continue


@author:anil


def father(a):

    

    print("father",a)

    

    def son(a):

        b=20

        print("son",a,b)

        

    son(a)

    #father(b)

    

    

father(10)



def father(a):

    

    print("father",a)

    

    def son(a):

        b=20

        print("son",a,b)

        return b

        

    c=son(a)

    print("father",c)

    #father(b)

    return c

    

    

a=father(10)

print(type(a),a)



def father(a):

    

    print("father",a)

    

    def son(b):

        b=30

        print("son",b)

        return b

        

    c=son(a)

    

    



father.son(20)


def father(a):

    

    print("father",a)

    

    def son(b):

        b=30

        print("son",b)

        return b

        

    c=son(a)

    

    


father(3)



def square_root():

    print("square root")


def triangle(a):

    side_of_triangle= a

    

    def perimeter(side_of_triangle):

        perimiter_value=3*side_of_triangle

        

        print("perimeter:",perimiter_value)

        

    def semi_perimeter(side_of_triangle):

        semi_peri_value=((3*side_of_triangle))/2

        print("semiperimeter:",semi_peri_value)

        

       

    

    perimeter(a)

    semi_perimeter(a)

        

    


triangle(30)

square_root()

"""


def square_root(a):

    

    #num1,num2=equal

    #number1 *number2= given value

    i=1

    

    num1=i

    num2=a

    j=1

    print(j)

    

    for j in range(i):

        j=j+1

        print(j)

        rem=num2/j

        i=i+1

        print(i)

    

    if num1==rem:

        

        print("square root",num1)

    else:

        print("not given")

    

square_root(100)


























Monday, December 21, 2020

python day 15 functions

 # -*- coding: utf-8 -*-

"""

Created on Tue Dec 22 07:28:09 2020

day 15

topic: functions continue 3


@author: anil


def my_funtion(a):

    print("inside my function",a)

    return "kasjfdklfhasjfhdjakfhjdsfhjakfhjhfjkdsahfjdahdsfjhfdsjhfjkadshfhsafjkhsdf"

    



a=my_funtion(5)

b='c'

print(type(b))

print("this is my main functions:",a,b)




def my_funtion(a):

    print("inside my function",a)

    return "bahubali"

a=my_funtion(5)

print(type(a))

b='c'

print(type(b))

print("this is my main functions:",a,b)




def my_funtion(a):

    print("inside my function",a)

    return a



a=my_funtion(5)

print(type(a))

b='c'

print(type(b))

print("this is my main functions:",a,b)



def my_funtion(*a):

    print("inside my function",a)

    return a



a=my_funtion(5)


print("this is my main functions:",a)




def my_funtion(*a):

    print("inside my function",a)

    return "bahubali",a,"praveen",a,a,a,a,a,a,a



a=my_funtion(5)


print("this is my main functions:",a)




def my_funtion(*a):

    print("inside my function",a)

    return ("bahubali",a,"praveen",a,a,a,a,a,a,a)



a=my_funtion(5)


print("this is my main functions:",a)


def my_funtion(*a):

    print("inside my function",a)

    return ["bahubali",a,"praveen",a,a,a,a,a,a,a]



a=my_funtion(5)

print(type(a))


print("this is my main functions:",a)



def my_funtion(*a):

    print("inside my function",a)

    return {"bahubali",a,"praveen",a,a,a,a,a,a,a}



a=my_funtion(5)

print(type(a))


print("this is my main functions:",a)



def my_funtion(**a):

    print(type(a))

    print("inside my function",a)

    return a



a=my_funtion(a=5,b=3,c=4)

print(type(a))


print("this is my main functions:",a)




def my_funtion(d,**a):

    print(type(a))

    print("inside my function",a,d)

    return a



d="king"

a=my_funtion(d,a=5,b=3,c=4)

print(type(a))


print("this is my main functions:",a)





def my_funtion(a,b,c,*d,**f):

    print(type(a))

    print(type(b))

    print(type(c))

    print(type(d))

    print(type(f))

    

    print("inside my function",a,d)

    return a



d="king"

a=my_funtion(2,3,5,d,x=5,y=3,z=4)

c=5

f=0

g=c/f

print(g)

print(type(a))


print("this is my main functions:",a)



def my_funtion(a,b,c,*d,**f): 

    print("inside my function",a,b,c,d,f)

    return a



d="king"

z,x,y=0,1,2

a=my_funtion(2,3,5,d,z=4,x=5,y=3)

print("this is my main functions:",d,z,x,y)



def my_funtion(a,b,c,*d,**f): 

    print("inside my function",a,b,c,d,f)

    return a,b,c,d,f



d="king"

z,x,y=0,1,2

a=my_funtion(2,3,5,d,z=4,x=5,y=3)

print(type(a))

print("this is my main functions:",a[4]['z'])

"""

def outer_funtion(): 

    a=10

    print("outer function",a)

    

    def inner_funtion(a,*args):

        print("inner function",a+args[0])

        

    inner_funtion(56000000,a)

    

   

    




outer_funtion()


















Sunday, December 20, 2020

python day 14 functions

 # -*- coding: utf-8 -*-

"""

day 14

topic: functions continue



def function_sec():

    print("secundrabad")

    

def function_erragadda():

    print("function_erragadda")

    


def function_kukatpally():

    print("function_kukatpally")

    

    


if __name__ == "__main__":

 

    function_sec()

    function_kukatpally()

    function_erragadda()

    function_kukatpally()

    function_erragadda()

    function_sec()




def funtion_one(i=5):

    print("addition:",i+6)


if __name__ == "__main__":

    funtion_one(11)



def funtion_one():

    print(args)

    print(type(args))

    i=args[0]

    j=args[1]

    k=args[2]

    l=args[3]

    m=args[4]

    print("addition:",i+j+k+l+m)


if __name__ == "__main__":

    my_list =[2,3,4,5,6]

    print(my_list)

    funtion_one(my_list)

    

# passing list

def funtion_one(my_list):

    '''print(args)

    print(type(args))

    i=args[0]

    j=args[1]

    k=args[2]

    l=args[3]

    m=args[4]

    print("addition:",i+j+k+l+m)'''

    for i in range(5):

        print(my_list[i])

   

if __name__ == "__main__":

    my_list =[2,3,4,5,6]

    #print(my_list)

    funtion_one(my_list)

    


def funtion_one(my_list):

    '''print(args)

    print(type(args))

    i=args[0]

    j=args[1]

    k=args[2]

    l=args[3]

    m=args[4]

    print("addition:",i+j+k+l+m)'''

    print(my_list)

    print(type(my_list))

   

if __name__ == "__main__":

    my_list ={2,3,4,5,6}

    print(type(my_list))

    #print(my_list)

    funtion_one(my_list)



def function_math(a,b):

    print(a**2+2*a*b+b**2)

    

    

   

if __name__ == "__main__":

    a=4

    b=3

    function_math(a,b)

    


from my_math_function import a_square_b_square_two_a_b

    

    

   

if __name__ == "__main__":

    a=4

    b=3

    a_square_b_square_two_a_b(a,b)



def function_kodi():

    print("this is kodi mundu function")

    

    def function_guddu():

        print("This is guddu mundu function")

    

    function_kodi()


if __name__ == "__main__":

    

    function_kodi()



def factorial(x):

    '''This is a recursive function

    to find the factorial of an integer'''


    if x == 1:

        return 1

    else:

        return (x * factorial(x-1))



if __name__ == "__main__":

    num = 10

    print("The factorial of", num, "is", factorial(num))


def functions_n_arguments(*myargs):

    print(myargs)


if __name__ == "__main__":

    num = 10

    functions_n_arguments(num,112,22,2,2,2,2,2)

"""

def functions_n_arguments(**kwargs):

    print(kwargs)

    print(type(kwargs))


if __name__ == "__main__":

    num = 10

    functions_n_arguments(num=10,i=11)






















































Friday, December 18, 2020

python day13 functions

 '''


day 13

topic: functions


syntax:

    

    def funtion_name():

        statements

     



def addition():

    pass



addition()



def addition():

    print("this is basha")



for i in range(100):

    addition()

    print(i)


def addition():

    print("this is basha")



while(1):

    addition()


def addition():

    

    print("addition")

    print("addition")

    print("addition")

    print("addition")

    print("addition")




addition()



def addition():

    for i in range(100):

        print("addition",i)

   


addition()


def addition():

    while(1):

        print("addition")

   


addition()

 

def addition(i,j):

    print("addition",i+j)

    print("addition",i-j)

    print("addition",i*j)

   



i,j=3,4

addition(i,j)


def addition(j=6,i=5):

    print(i)

    print("addition",i+j)

    print("addition",i-j)

    print("addition",i*j)

   

addition(6,)



'''


def power_fn(x):

    result=x*x

    #print(result)

    return result


a=1

a=power_fn(2)

print(a)

Thursday, December 17, 2020

python day 12 topic set

 '''day12

topic: set



s1={1,2,3}

print(s1)

print(type(s1))



s1={"apple","banana","oranges"}

print(s1)

print(type(s1))


s1={"apple",1,True,"banana",3,"angira",2}


print(s1)

print(type(s1))



a =True

print(True+True)


print(False+False)

print(True+False)


b1={"vodka","zen","wine"}

print(b1)

b1.add("rum")

print(b1)

b1.add("kf")

print(b1)


b1={"vodka","zen","wine"}

print(b1)

b1.clear()

print(b1)


b1={"vodka","zen","wine"}

print(b1)

b2=b1.copy()

print(b2)

b3=b2.copy()

print(b3)



x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


z = x.difference(y)

k = y.difference(x)


print(z)

print(k)



x = {"apple", "banana", "cherry"}

print(x)


y = {"google", "microsoft", "apple"}

x.difference_update(y)



print(x)




fruits = {"apple", "banana", "cherry"}

print(fruits)


fruits.discard("banana")


print(fruits)



x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


z = x.intersection(y)


print(z)



x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


x.intersection_update(y)


print(x)



x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "facebook"}


z = x.isdisjoint(y)


print(z)


x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


z = x.isdisjoint(y)


print(z)


x = {"a", "b", "c"}

y = {"f", "e", "d", "c", "b", "a"}


z = x.issubset(y)


print(z)



x = {"f", "e", "d", "c", "b", "a"}

y = {"a", "b", "c"}


z = x.issuperset(y)


print(z)




fruits = {"apple", "banana", "cherry"}


fruits.pop()


print(fruits)


fruits = {"apple", "banana", "cherry"}


fruits.remove("banana")


print(fruits)



x = {"apple", "banana", "cherry","panda"}

y = {"google", "microsoft", "apple","panda"}


z = x.symmetric_difference(y)


print(z)


x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


x.symmetric_difference_update(y)


print(x)


x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


z = x.union(y)


print(z)

'''


x = {"apple", "banana", "cherry"}

y = {"google", "microsoft", "apple"}


x.update(y)


print(x)





























Wednesday, December 16, 2020

python day11 dictionaries

 '''day11


concept : dictionary


#empty dictionary

d1={}

print(type(d1))


d1={

        "key":1,

        "key2":2

    }

print(d1)


d1={

        "key":1,

        "key2":2

    }

print(d1["key"])



d1={

        "key":1,

        "key2":2

    }

print(d1["key"],d1["key2"])


d1={

        "key":1,

        "key2":2

    }

print(d1["key"])



d2={

    "flowers":"rose","flowers1":"rose","flowers2":"rose","flowers3":"rose","flowers4":"rose",

    

    }


print(d2["flowers"])

print(d2["flowers1"])

print(d2["flowers2"])

print(d2["flowers4"])

print(d2["flowers3"])



d2={

    "flowers":"rose","flowers":"rose","flowers":"rose","flowers":"rose","flowers":"rose",

    

    }


print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])



d2={

    "flowers":"rose",

    "flowers":"jasmin",

    "flowers":"lilli",

    "flowers":"chilli",

    "flowers":"lolli",

    

    }


print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])

print(d2["flowers"])




#nested dictionary

d2={

    "flowers":{"fl":"chamanthi"},

    "flowers1":"jasmin",

    "flowers2":"lilli",

    "flowers3":"chilli",

    "flowers4":"lolli",

    

    }


print(d2["flowers"]["fl"])

print(d2["flowers1"])

print(d2["flowers2"])

print(d2["flowers3"])

print(d2["flowers4"])



#nested dictionary

d2={

    "flowers":{"fl":"chamanthi"},

    "flowers1":{"fl":"chamanthi"},

    "flowers2":{"fl":"chamanthi"},

    "flowers3":{"fl":"chamanthi"},

    "flowers4":{"fl":"chamanthi"},

    

    }


print(d2["flowers"]["fl"])

print(d2["flowers1"]["fl"])

print(d2["flowers2"]["fl"])

print(d2["flowers3"]["fl"])

print(d2["flowers4"]["fl"])



d2={

    "flowers":{"fl":"chamanthi"},

    "flowers1":{"fl":"chamanthi1"},

    "flowers2":{"fl":"chamanthi2"},

    "flowers3":{"fl":"chamanthi3"},

    "flowers4":{"fl":"chamanthi4"},

    

    }


print(d2["flowers"]["fl"])

print(d2["flowers1"]["fl"])

print(d2["flowers2"]["fl"])

print(d2["flowers3"]["fl"])

print(d2["flowers4"]["fl"])



d2={

    "flowers":{"fl":{"st1":"praveen"}},

    "flowers1":{"fl":"chamanthi1"},

    "flowers2":{"fl":"chamanthi2"},

    "flowers3":{"fl":"chamanthi3"},

    "flowers4":{"fl":"chamanthi4"},

    

    }


print(d2["flowers"]["fl"]["st1"])

print(d2["flowers1"]["fl"])

print(d2["flowers2"]["fl"])

print(d2["flowers3"]["fl"])

print(d2["flowers4"]["fl"])



#list in dictionary

d2={

    "flowers":[1,2,3],

    "flowers1":{"fl":"chamanthi1"},

    "flowers2":{"fl":"chamanthi2"},

    "flowers3":{"fl":"chamanthi3"},

    "flowers4":{"fl":"chamanthi4"},

    

    }


print(d2["flowers"])

print(type(d2))

print(type(d2["flowers"]))

'''

#tuple in dictionary

d2={

    "flowers":{"key3":3},

    "flowers1":{"fl":"chamanthi1"},

       

    }


print(d2["flowers"])

print(type(d2))

print(type(d2["flowers"]))





















Tuesday, December 15, 2020

python day 10 tuples

 '''day10 

tuples


example1:

    

colors=(1,2,3)

colors



colors=(255,255,255)

print(colors)



colors=(255,255,255)

print(colors[0:2])


colors=(255,255,255,255,244,23434,3435434,23423423)


type(colors)

print(colors[:])



colors=(255,255,255,255,244,23434,3435434,23423423)


type(colors)

print(colors[:5])


colors=(255,255,255,255,244,23434,3435434,23423423)


type(colors)

print(colors[1:5])



colors=(0,2,25,265,244,23434,3435434,23423423)


type(colors)

print(colors[1:5])



tuple1 = ("abc", 34, True, 40, "male")


tuple1 = ("abc", 34, True, 50, "male")

#it will have attributes llike insert, pop , remove


print(len(tuple1))

'''

tuple1 = ("abc", (1,2,2,2,2,2,22), True, 50, "male")

tuple2=tuple1

print(tuple1)

print(tuple2)

print(id(tuple1),id(tuple1))


Thursday, December 10, 2020

pattern printing using for loop in python

 


number_of_stars=10


for i in range(5):

    

    for j in range(number_of_stars):

        if i<=j:

            print("",end=' ')

    for j in range(number_of_stars):

        if i>=j:

            print("*",end=' ')

    print()

for i in range(number_of_stars):

    for j in range(number_of_stars):

        if i>=j:

            print("",end=' ')

    for j in range(number_of_stars):

        if i<=j:

            if i<=4:

                print("*",end=' ')

    print()



     * 

         * * 

        * * * 

       * * * * 

      * * * * * 

 * * * * * * * * * * 

  * * * * * * * * * 

   * * * * * * * * 

    * * * * * * * 

     * * * * * * 

square pattern printing using for loop in python

 # -*- coding: utf-8 -*-

"""

Created on Fri Dec 11 08:25:54 2020


@author: Onyx1

"""


for i in range(5):

    

    for j in range(5):

        if i<=j:

            print("",end=' ')

    for j in range(5):

        if i>=j:

            print("*",end=' ')

    print()

for i in range(5):

    

    for j in range(5):

        if i>=j:

            print("",end=' ')

    for j in range(5):

        if i<=j:

            print("*",end=' ')

    print()



output:

    * 

    * * 

   * * * 

  * * * * 

 * * * * * 

 * * * * * 

  * * * * 

   * * * 

    * * 

     * 

python day 8 list

 '''

day 8 list ,tuples,



#example1:

    

fruits =[]

print(fruits)

print(type(fruits))



fruits =[1]

print(fruits)

print(type(fruits))




fruits =[1,2,3,3,3,3,3,3,3,3,3,3,3,3]

print(fruits)

print(type(fruits))



fruits =[1,2,3,4,5]

print(fruits[0])

print(fruits[1])

print(fruits[2])

print(fruits[3])

print(fruits[4])

print(type(fruits))



fruits =[1,2,3,4,5]

for i in range(5):

    print(fruits[i])


print(type(fruits))


fruits =[1,2,3,4,5]

print(id(fruits[0]))

print(id(fruits[1]))

print(id(fruits[2]))

print(id(fruits[3]))

print(id(fruits[4]))

#print(id(fruits[0]))



fruits =[1,2,3,4,5]

print(fruits[-1])

print(fruits[-2])

print(fruits[-3])

print(fruits[-4])

print(fruits[-5])


fruits=["mango","apple","banana","grapes","orange"]

print(fruits[0])

print(fruits[1])

print(fruits[2])

print(fruits[3])

print(fruits[4])

print(type(fruits))

print(fruits[-1])

print(fruits[-2])

print(fruits[-3])

print(fruits[-4])

print(fruits[-5])


flowers=["rose","lotus","lilli","jasmine","chamanthi"]

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])

print(flowers[4])


fruits=["rose","lotus","lilli","jasmine","chamanthi"]

print(fruits[0])

print(fruits[1])

print(fruits[2])

print(fruits[3])

print(fruits[4])


flowers=["rose","lotus","lilli","jasmine","chamanthi"]


flowers.append("mandara")


flowers.append("chitti gulabi")

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])

print(flowers[4])

print(flowers[5])

print(flowers[6])



flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.insert(0,"gilledu")

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])

print(flowers[4])

print(flowers[5])



flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.insert(3,"gilledu")

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])

print(flowers[4])

print(flowers[5])



flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.remove("chamanthi")

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])



flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.pop(2)

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])



flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.sort()

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])




flowers=["rose","lotus","lilli","jasmine","chamanthi"]

flowers.reverse()

print(flowers[0])

print(flowers[1])

print(flowers[2])

print(flowers[3])

print(flowers[4])

'''

Tuesday, December 8, 2020

python day7 for loops

 '''

#day 7 for loops


syntax:while condition:

    statements

    


syntax: for variable in range(start,stop,step):


 for i in range(5):

     print(i)

     

for i in range(5):

     print("*")

     

for i in range(5):

     print("praveen")

     

     

k=0

for i in range(5):

     for j in range(5):

         print("j=",j,end="-")

         k=k+1

         print("k:",k)



for i in range(5):

    for j in range(5):

        print("*")


for i in range(5):

    for j in range(5):

        if i==j:

            print(i,j)

'''

for i in range(5):

    for j in range(5):

        #if i==j:

        print("*",end=' ')

    print()






Monday, December 7, 2020

python day6 if,elif,else,while,range

 i,j=4,6

'''

if i==5:

    print("thi is if loop")

    

elif i==4 and j==5:

    print(i,j)


elif i==4 or j==5:

    print("elif two:",i,j)

        

else:

    if i==4:

        print("this is else loop")

    else:

        #print("this is else else loop")

        if i==3:

            print("this is else else if loop")



#break execution:

while(1):

    print("this is sams")

    break


while(1):

    while(1):

        print("this is sams")

        break

    print("this is nag")

    break

    


#range(start,stop,step)


for i in range(-10,100,10):

    print(i)


a=0

a=range(1,10,2)

print(a)

'''



    


Friday, December 4, 2020

python day5, comments,if else introduction

 #################################################

##########this is program developed by Mr. Praveen

######## developed on :05-12-2020

### this is the simple operators testing

###second time developed by Mr. Anil

########################

a=10

b=20

#c=0


'''

#comments

1.single line comments

#

2.multiline comments

  your lines comes here  

'''


'''

#addition

c=a+b

print(type(a),type(b),type(c))

print("type c after additon",c)

#substraction

c=a-b

print(c)

c=int(a/b)

print(type(a),type(b))

print("this is after division",type(c),c)

c=b//a

print("this is testing",c,type(c))


if a>=20 and a==20:#a=10<10 10<20

    print("if",a)

else:

    print("else",a)

    '''

    

#input()======>takes the input user

'''

total_marks=int(input("please enter a number:"))

print(total_marks)

if total_marks >=75:

    print("distinction")

'''

while a==10:

    total_marks=int(input("please enter a number:"))

    print(total_marks)

    if total_marks >=75:

        print("distinction")

        print(a)

    elif total_marks>50 and total_marks<75:

        print("c grade")

    else:

        print("your not given any grade")

Thursday, December 3, 2020

python day4,variable types,print formats

 variable

=====================
1.a,b,c,d------allowed
2. total,subtotal,grandtotal-----allowed
3.total1,key1,key2354 -----allowed
4.grand_total,coaching_center, cinema_theatre,s_s_rajamouli,SSRajamouli,CinemaTheatre---allowed
5.ca$h---not allowed
6._mode---allowed
7._ab_abc_abcd---allowed

sep in print:
===============
print("this is praveen","this is testing",sep="------")

output:
this is praveen------this is testing

format in print
==================
print("My name is {firstname}, I'm {age}".format(firstname = "praveen", age = 36))
print("My name is {0}, I'm {1},totals {2}".format("praveen",36,24.56))
print("My name is {0}, I'm {1},totals {total}".format("praveen",36,total=24.56))



if and else:
========================
condition true if statements prints
condition false then else statement prints

a=0
if a==1:
print("we will go movies")
else :
print("indendation is also working fine")

print("second friend sit in home")


ex2:
a="test"
if a=="test":
print("this is if loop")
print("we will go movies")
print("we will go movies")
print("we will go movies")
else :
print("this is else loop")

print("second friend sit in home")

example3:
a=4
budget=1
alcohal=1
beach=2
if a==4:
if budget==1:
if alcohal==1:
print("we will drink")

if beach==1:
print("beach is empty")
else:
print("beach is very busy")

else:
print
else:
print("no goa sorry")

else :
print("this is else loop")

print("second friend sit in home")


Multiple data bases support in SQLITE3

 DATABASES = {

    'default': {
        'ENGINE': 'django.db.backends.sqlite3', 
        'NAME': os.path.join(DIR, 'django.sqlite3'),
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    },
    'anil': { # this is our sample db, already created
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(DIR, 'anil_Sqlite.sqlite'),
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

python class topic video