Introduction:-

"Hello everyone who is reading this.This is my python programs which i have written and you can use this programs for your use"

Image not loaded properly



Python Scripts:-
DATE:-26/07/2020 DAY:-Sunday
1.A+B the whole squre:-
'''
a=float(input("Enter a"))
b=float(input("Enter b"))
result=(a+b)/23
print(result)
input("Press Any Key....")
'''

2.Abstract_Base_Class_And_@abstractmethod_OOPs_15:-
'''
'''
DATE:-02/07/2020 Abstract Base Class And @abstractmethod In Python(OOPs-15):-
DAY:-Wednesday
'''
from abc import ABC,abstractmethod
class Shape(ABC):
    @abstractmethod
    def printarea(self):
            return 0
    def new(self):
        return 0
class Rectangle(Shape):
    type="Rectangle"
    sides=4
    def __init__(self):
        self.length=6
        self.breadth=7
        self.hi=3
    def printarea(self):
        return self.length*self.breadth
    def new(self):
        return self.length*self.hi
rect1=Rectangle()
print(rect1.printarea())
print(rect1.new())
## ABCMeta,abstractmethod

'''
2.Abstraction And Encapsulation In Python:-
'''
'''
DATE:-25/06/2020 Abstraction And Encapsulation In Python(OOPs-6):-
DAY:-Thursday
'''
class Employee:
    no_of_leaves=8
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves
    @classmethod
    def from_str(cls,string):
##        params=string.split("-")
##        print(params)
##        return cls(params[0],params[1],params[2])
        return cls(*string.split("-"))
    @staticmethod
    def printgood(string):
        print("This is good" +string)
        
##Gunjan=Employee("Gunjan",455,"Instructor")
##rohan=Employee("Rohan",250,"Student")
##karan=Employee.from_str("Karan-455-Student")
##rohan.change_leaves(34)
##Employee.no_of_leaves=0
Karan=Employee("Karan",455,"Student")
print(Karan.printgood("Gunjan"))

'''
3.Akhbaar_Padhke_Sunaao_Ex-9:-
'''
'''
DATE:-10/07/2020 Akhbaar Padhke Sunaao Ex-9:-
DAY:-Friday
'''
import time
import requests
import json
def speak(str):
    from win32com.client import Dispatch
    speak=Dispatch("SAPI.SpVoice")
    speak.Speak(str)
if __name__=='__main__':
    speak("blah blah")
payload={'username':'Gunjan','password':'gnayak@1234567#'}
##r=requests.get('https://images.pexels.com/photos/66898/elephant-cub-tsavo-kenya-66898.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',params=payload)
##with open('comic.png','wb') as f:
##    f.write(r.content)
##print(r.status_code)Used to see the status code
##print(r.ok)used to see any errors in server and client
##print(r.headers)
##print(r.text)used to see the text content
##r=requests.post('https://httpbin.org/post',data=payload)
##print(r.text)
##r=requests.post('https://news.org',params=payload)
##print(r.text)
##['article'][i][title]
import requests
url = ('http://newsapi.org/v2/top-headlines?'
       'country=us&'
       'apiKey=72735b014aec49238da8963b817ad1d2')
response = requests.get(url)
##print(response.json())
a=response.text
My_json=json.loads(a)
My_json
print(json)
for i in range(0,11):
    speak(My_json)

'''
4.Anonymous or Lammbda Function In Python:-
'''
'''
DATE:-08/06/2020 Anonymous/Lambda Function In Python:-


'''
#Lambda functio is also know as anonymous function.
minus=lambda x, y: x-y
##lambda is a one line function so it is called as anonymous function
print(minus(9,4))
print("new")
def a_first(a):
    return a[1]
a=[[1,4],[5,6],[8,23]]
a.sort(key=lambda x:x[1])
print(a)

'''
5.Args And Kwargs In Python:
'''
'''
DATE:-09/06/2020 Args And Kwargs In Python:-
NEXT DATE:-10/06/2020

'''
##def function_name_print(a,b,c,d,e):
##    print(a,b,c,d,e)
def fun2(normal,*b,**c):
    print(normal)
    for item in b:
        print(item)
    print("\nHi i am Gunjan Nayak How are you I am fine how about you.")
    for key, value in c.items():
        print(f"How are {key} you i am fine. how about you {value}")
##    print(args)
##function_name_print("Babai","Gunjan","Sriram","Arunan","Sanjay")
a=["Babai","Gunjan","Sriram","Arunan","Sanjay","Rahul"]
normal=34
d={"Gunjan":"Nayak","Babai":"Gunu"}
fun2(normal,*a,**d)
##This is used to print the data through *args.
##This is an unique method to print.
##We can write the *args like '*any_name'.
##We can write normal argument first,second *args argument and then **kwargs.
##We can write **kwargs like this '**any_name'.

'''
6.Arithmetic Progression:-
'''
a=float(input("enter the first number"))
d=float(input("entter the common difference"))
n=float(input("enter the number"))

result=a+(n-1)*d
print(result)

'''
7.Astrologer's Star ex-4:-
'''
##n=str(input("Enter the number?"))
##f=open("Astro.txt","a")
##c=f.write(n)
##d=f.write(n)
##e=f.write(n)
##print(c,end="\n")
##print(d,end="\n")
##f.close()
##a=int(input("Enter the number"))
##b=bool(int(input("Enter the boolean value")))
##def star(a,b):
##    if b==True:
##        c=1
##        while c<=a:
##            print(c*"*")
##            c=c+1
##    else:
##        while a>0:
##            print(a*"*")
##            a=a-1
##a=int(input("Enter"))
####a=int(input("enter"))
##b=bool(input("Enter the value"))
##e=True
##d=False 
##if b==True:
##    print("Try Again")
##if b==False:
##    print("*")
##    print("**")
##    print("***")
##    print("****")
##a=bool(input("Enter the value"))
##if a!=True:
##    print("*")
##    print("**")
##    print("***")
##    print("****")
##elif a==False:
##    print("Try Again")
##else:
##    print("Try Again")
##
a=float(input("Enter a value"))
bool=a
if a==True:
    print("*")
    print("**")
    print("***")
    print("****")
elif a<0:
    print("*")
    print("**")
    print("***")
    print("****")
else:
    print("try")

    





'''
8.Break And Continue In Python:-
'''
'''

DATE:-30/05/2020 Break And Continue Statement In Python:-

'''


##d=0
##while(True):
##    if d+1<5:
##        d=d+1
##        continue
##    print(d+1)
##    if(d==44):
##        break#stop the loop
##    d=d+1
##a=float(input("Enter the number?"))
##while(a<100):
##    print(a)
##while(True):
##    a=float(input("Enter the number"))
##    if a>100:
##        print("Congrates!! You Have break the loop.\n")
##        break
##    else:
##        print("Try Again!\n")
##        continue
while(True):
    a=input("enter the password")
    if a==str("Gunjan"):
        print("User Verified!!")
        break
    else:
        print("Wrong password!!")
        continue

'''
9.Class Methods As Alternative constructors:-
'''
'''
DATE:-23/06/2020 Class Methods As Alternative Constructors(OOPs5):-
DAY:-Tuesday
'''
class Employee:
    no_of_leaves=8
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves
    @classmethod
    def from_str(cls,string):
##        params=string.split("-")
##        print(params)
##        return cls(params[0],params[1],params[2])
        return cls(*string.split("-"))
Gunjan=Employee("Gunjan",455,"Instructor")
rohan=Employee("Rohan",250,"Student")
karan=Employee.from_str("Karan-455-Student")
rohan.change_leaves(34)
##Employee.no_of_leaves=0
print(rohan.no_of_leaves)
print(Gunjan.no_of_leaves)
print(karan.name)

'''
10.Class Methods In Python:-
'''
'''
DATE:-22/06/2020 Class Methods In Python(OOPs):-
DAY:-Monday
'''
class Employee:
    no_of_leaves=8
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves        
Gunjan=Employee("Gunjan",455,"Instructor")
rohan=Employee("Rohan",250,"Student")
rohan.change_leaves(34)
##Employee.no_of_leaves=0
print(rohan.no_of_leaves)
print("Hi")
'''
11.Classes And Objects In Python:-
'''
'''
DATE:-18/06/2020 Classes And Objects In Python:-
<-------------------Object Oriented Programming In Python(OOPs)---------------->
DAY:-Thursday
'''
'''
Classes:-Template.
Object:-Instance Of The Class.
OOPs uses DRY(Do not Repeat Yourself) concept.
'''
12.Comprehensions_In_Python:-
'''
'''
DATE:-05/07/2020 Comprehensions In Python:-
DAY:-Sunday
-----------------NEXT DAY-----------------------
DATE:-06/07/2020 Comprehension In Python:-
DAY:-Monday
'''
##ls=[]
##for i in range(100):
##    if i%3==0:
##        ls.append(i)
ls=[i for i in range(100) if i%3==0]
#This is called as list comprehension.
##print(ls)   
##print("New")
dict1={i:f"item{i}" for i in range(5)}
dict2={value:key for key,value in dict1.items()}
##d=[i for i in range(100) if i%3==0]
##print(d)
print(dict1,"\n",dict2)
dresses={dress for dress in ["dress1","dress2","dress2"]}
print(dresses)
print("Generator Comprehensiom\n")
evens=(i for i in range(100) if i%2==0)
print(evens.__next__())
##print(evens.__next__())
##print(f"{evens.__next__()}"*10)
for item in evens:
    print(item)

'''

'''
13.Coroutines_In_Python:-
'''
'''
DATE:-08/07/2020 Coroutines In Python:-
DAY:-Wednesday
'''
def searcher():
    """Some 4 seconds time consuming task"""
    import time
    book="This is a book on Gunjan Nayak And Gunjannayak.com"
    time.sleep(4)
    while(True):
        text=(yield)
        if text in book:
            print("Your text is in the book")
        else:
            print("Text is not in the book")
    while(True):
        text1=(yield)
        if text1 in d:
            print("Your text is in book")
        else:
            print("Your text is not in the book")
            
search=searcher()
next(search)
search.send("Gunjan")
input("Press any key...")
search.send("Gunjan")
search.close()
search.send("Gunjan")
##'''Program that will '''
##def searcher1():
##    import time
##    f=open("does.txt","r")
##    d=f.read()
##    f.close()
##    time.sleep(4)
##    while(True):
##        text1=(input("Enter the word"))
##        if text1 in d:
##            print("Your text is in book")
##            break
##        else:
##            print("Your text is not in the book")
####s1=searcher1()
####next(s1)
####s1.send(input("Enter the text you want to see?"))
##d1=searcher1()
##

''''
14.Creating Our First Class In Python:-
'''
'''
DATE:-19/06/2020 Creating Our First Class In Python:-
DAY:-Friday
'''
#The meaning of 'pass' is nothing.
class student:
    pass
Gunjan=student()
Babai=student()
Gunjan.name="Gunjan"
Gunjan.std=11
Gunjan.section=1
Babai.std=7
Babai.subject=["hindi","maths"]
print(Gunjan.section,Babai.subject)

'''
15.Creating_A_Commandline_Using_Python:-
'''
'''
DATE:-16/07/2020 Creating A Commandline Using Python:-
DAY:-Thursday
'''
import argparse
import sys
def calc(args):
    if args.o=='add':
        return arg.x+args.y
    elif args.o=='mul':
        return arg.x*args.y
    elif args.o=='sub':
        return arg.x-args.y
    elif args.o=='div':
        return arg.x/args.y
    else:
        return "Something went wrong."
if __name__=='__main':
    parser=argparse.ArgumentParser()
    parser.add_argument('--x',type=float,dafault=1.0,help="Enter first number.Please contact Gunjan.This is a utility")
    parser.add_argument('--y',type=float,dafault=3.0,help="Enter second number.Please contact Gunjan.This is a utility")
    parser.add_argument('--o',type=str,dafault=1.0,help="Please contact Gunjan.This is a utility for calculation")
    arg=parser.parse_arg()
    sys.stdout.write(str(calc(args)))
calc(input())

'''
16.Decorators In Python:-
'''
'''
DATE:-17/06/2020 Decorators In Python:-
DAY:-Wednesday
'''
##def function1():
##    print("Hello WOrld")
##fun2=function1
##del function1
##fun2()
##def funcret(num):
##    if num==0:
##        return print
##    if num==1:
##        return sum
##a=funcret(1)
##print(a)
##def executor(func):
## func("this")
##executor(print)
def dec1(func1):
def nowexec():
print("Executing now")
func1()
print("Executed")
return nowexec
@dec1
def who_is_Gunjan():
print("Gunjan Nayak Is a Good Boy")
##who_is_Gunjan=dec1(who_is_Gunjan)
who_is_Gunjan()

'''
17.Diamond_Shape_Problem_In_Multiple_Inheritance_OOPs-13:-
'''
'''
DATE:-30/06/2020 Diamond Shape Problem In Multiple Inheritance OOPs-13:-
DAY:-Tuesday
'''
class A:
    def met(self):
        print("this is a method from class A")
class B(A):
    def met(self):
        print("this is a method from class B")
class C(A):
    def met(self):
        print("this is a method from class C")
class D(C,B):
    def met(self):
        print("this is a method from class D")
a=A()
b=B()
c=C()
d=D()
d.met()

'''
18.Dictionary And Its Functions:-
'''
##'''
##DATE:-25/05/2020
##Dictionary is a nothing but key values in python.
##We can also add a dictionary inside a dictionary.
##In this program I have written 'dict' instead of 'dictionary'
##
##
##
##'''
##d1={}
##print(type(d1))
##d2={"Gunjan":"Mutton","Maa":"Fish",
##    "Guddu":"All","Me":{"b":"Dosa","L":"Fish","D":"Mutton"}}#this is a sub dict
##'''
##'{}' This is used to write a dictionary in python
##
##'''
##d2["Gunjan"]="Milk"
##'''
##
##This 'dict name[]="element name"' is used to add an element.
##This is called as key in dict.
##
##
##
##'''
##print(d2["Me"]["b"])
##d2["Sriram"]="Chicken"
##print(d2)
##print(d2["Sriram"])
##print(d2.copy())
##d3=d2.copy()
##del d2["Guddu"]#This is used to delete an element in dict
##print(d2)
##print(d2.get("Gunjan"))#This is to get the value of the element in the dict.
##d2.update({"Emma":"Watson"})
##'''
##
##This '.update({"word name":"meaning"})' is used to add or
##update an elment in the dict
##
##
##
##'''
##
##
##print(d2)
##print(d2.keys())#This is used to print keys in dict
##print(d2.items())#This is used to print the items of the dict(or)meanings.
##
##
##
##
##
##
##
##
##'''
##
##'[]' is used to type or print the value of any word
##in the dict.Again one '[]' after printing a dictionary,is used to
##print the elements of another dictionary.
##
##
##
##'''

'''

DATE:-27/05/2020 THIS IS A PRACTICE:-





'''


d1={"hi":"how are you?",
    "bye":"ok see you!!",
    "hello!":"i am fine how about you?",
    "what are you doing":"i am an program created by Gunjan Nayak.",
    "Are you a bot":"No!! i am an ai created by Gunjan Nayak.My father is Gunjan Nayak"
    ""
    }
d1.update({"hi":"how are you!!"})

d1["Is aquaman iscool?"]="Yes!"
print(d1[input("your own AI")])
















'''
19.Driving License Program:-
'''
a=float(18)
b=float(input("Enter Your Age"))
c=60




    
if b>a:
    if b>c:
        print("NO")
    else:
        print("Your eligible for driving!!!")
        
    

##else:
##    print("No Your Not Eligible For Driving.")
####if b>60:
####    print("NO please")

'''
20.Enumarate Function In Python:-
'''
'''
DATE:-12/06/2020 Enumerate Function In Python:-
DAY:-Friday


'''
l=["Meat","Vegetable","Fruit","Magi"]
##i=1
##for item in l:
##    if i%2 is not 0:
##        print(f"Jarvis please buy {item}")
##    i+=1
'''
The above program can be written in short through the use of
enumerate function.In enumerate function 'index' means number.

'''
l.sort()
for index, item in enumerate(l):
    if index%1==0:
        print(f"Jarvis please buy {item}")
    

'''
21.Faulty Calculator ex-2:-
''''
a=float(input("enter"))
b=input("Enter the operator")
c=float(input("enter"))
d="+"
e="-"
f="*"
g="/"
if b==d:
    if c==float(10) and a==float(11):
        print(float(23))
    else:
        print(a+c)
if b==e:
    print(a-c)
if b==f:
    if a==float(2) and c==float(3):
        print(float(23))
    else:
        print(a*c)
if b==g:
    print(a/c)

''''
22.file:-
'''
'''
DATE:-12/06/2020
DATE:-Friday
This Python File Or Program is only used for
the 'Working Of Import In Python' Python File Or Program:-


'''
a=10
def babai(str):
    print(f"This is just an example {str}.")

'''
23.file2:-
'''
'''
DATE:-14/06/2020 This 'If_main' Python File Only:-
DAY:-Sunday


'''
import If_main
print(If_main.add(4, 6))

'''
24.For Loops In python:-
'''
##'''
##DATE:-28/05/2020 For Loops In Python:-
##
##
##'''
##
##
##list1=[["Gunjan",float(7)],["Guddu",float(5)],["Kalu",float(78)],
##       ["Miku",float(100)]]
##dict1=dict(list1)
##for item in dict1:
##    print(item)
##print(dict1)
##for item, Chicken in dict1.items():
##    print(item,"Eats Chicken-", Chicken)#This is used to print all elements in list in line by line.
##    
items=[int,float,
      "Gunjan",3,
      6,7,8,9]
for item in items:
    if str(item).isnumeric() and item>6:
        print(item)
            

''''
25.F-String And String Formatting In Python:-
'''
'''
DATE:-09/06/2020 F-String And String Formatting In Python:-


'''
import math
a="Gunjan"
##b="This is %s"%a
##print(b)
##'''
##The above example is called as string formatting in python.
##
##'''
##print("New")
##a="Gunjan"
##c=34
##b="This is %s %s"%(a,c)
##print(b)
##'''
##The above example after 'print("New")' is also called as string formatting.
##
##
##'''
##print("New2")
##a="Gunjan"
##b="My name is {}"
##d=b.format(a)
##print(d)
##'''
##The above example after 'print("New2")' is also called as string formatting.
##
##'''
##print("New3")
##a="Gunjan"
##e="Nayak"
##b="My name is {0} {1}"
##d=b.format(a,e)
##print(d)
##'''
##The above example after 'print("New2")' is also called as string formatting.
##
##'''
b=3
c=f"This is {a} {b} {math.tan(90)}"
print(c)

'''
The above example is actually called as a f-string.We have to first
type 'f' after the variable and before the double cots.We have to determine
the other variable by carly brackets(i.e, "") and then tyoe the variable.
F-String can also do mathematics operations.
we canalso use 'math' module.The full form of f-string is 'Fast-String'



'''
##d=math.tan(int(input("enter")))
##print(d)

       


                                                         



'''
26.Function_Caching_In_Python:-
'''
'''
DATE:-07/07/2020 Function Caching In Python:-
DAY:-Tuesday
'''
import time
from functools import lru_cache
@lru_cache(maxsize=int(input()))
def some_work(n):
    """Some task taking"""
    time.sleep(n)
    return n
if __name__=='__main__':
    print("Now running some work")
    some_work(3)
    some_work(3)
    some_work(3)
    print("done")
    some_work(3)
    print("Called again")

'''
27.Functions And Docstrings In Python:-
'''
'''

DATE:-02/06/2020 Funtions And Docstrings In Python:- 
'''


a=9
b=8
c=sum((a,b))#This is used tob sum two data.
print(c)
print("User Define")
def function1(a,b):
    print("Gunjan Nayak",a+b)
##    a=float(input("hi"))
##    print(a+2)
function1(5,7)
def function2(a,b):
    """This is a function which will calculate average of two numbers
fucker"""
    average=(a+b)/2
    print(average)
    return average
print(function2.__doc__)#This is a docstring
##v=function2(5,7)
##print(v)
##'''
##'def' is used to write our own user defined function.
##
##'''
##print("Docstring")
##print(function2.doc)

'''
28.Generators_In_Python:-
'''
'''
DATE:-05/07/2020 Generators In Python:-
DAY:-Sunday
'''
'''
Iterable-__iter__() or __getitem__()
Iteration-__next__()
Iteration
'''
'''Generator is a iterator'''
def gen(n):
    for i in range(n):
        yield i
g=gen(3)
##print(g.__next__())
##print(g.__next__())
##print(g.__next__())
##print(g.__next__())
##for i in g:
##    print(i)
h="gunjan"
ier=iter(h)
print(ier.__next__())
print(ier.__next__())
print(ier.__next__())
print(ier.__next__())
print(ier.__next__())
print(ier.__next__())
print(ier.__next__())
##for c in h:
##    print(c)

'''
29.Guess The Number ex-3:-
'''
##k=float(input("Guess The Number!!! If You Can!!! Only Six Digits Allowed!!"))
##
##while(k>6):
##    print("Not greater than 6")
##    break
##while(k==6):
##    print("Little smaller")
##    break
##while(k==5):
##    print("Yes")
##    break
##while(2<k<4):
##    print("Little more")
##    break
##while(k==4):
##    print("Just one step")
##    break
##while(0<k<2):
##    print("Focus")
##    break
##while(k==2):
##    print("intermediate")
##    break
##while(k<1):
##    print("Focus more")
##    break
##print(5-k,"no of guess left")
##k=k+1
##this bis my program.
a=9
number_of_guesses=1
print("Number guess is limited to 9 times: ")
while(number_of_guesses<=9):
    guess_number = float(input("Guess the number :\n"))
    if guess_number<11:
        print("Too small")
    elif guess_number>18:
        print("you enter greater")
    else:
        print("you won\n")
        print(number_of_guesses,"no of guess he took to finish")
        break
    print(9-number_of_guesses,"no of guesses left")
    number_of_guesses=number_of_guesses+1
if(number_of_guesses>9):
    print("Game Over")

'''
30.Health Manangement System ex-5:-
'''
import datetime
print("Enter 1. For Me.")
print("Enter 2. For My Friend.")
print("Enter 3. For My classmate.")
print("Pease Do Not Enter Alphabets Or Letters:)")
a=int(input("Enter the number to specify who you are?"))
if a==1:
    print(datetime.datetime.now())
    b=open("Me.txt","r")
    c=b.read()
    print(c)
    print(datetime.datetime.now())
if a==2:
    print(datetime.datetime.now())
    d=open("My friend.txt","r")
    e=d.read()
    print(e)
    print(datetime.datetime.now())
if a==3:
    print(datetime.datetime.now())
    f=open("My classmate.txt","r")
    g=f.read()
    print(g)
    print(datetime.datetime.now())

'''
31.Healthy Programmer ex-7:-
'''
'''
DATE:-16/06/2020 Healthy Programmer Excersice:-7
DAY:-Tuesday
Water
Eyes
Physical 
'''
import time
import datetime
import pygame
print("Healthy Programmer.\n")
print("Every five Minutes After You Must Drink Water Or The Song Will Continue.\n")
print("Every 30 Minutes Later You Must Do Eye Exercise Or The Song Will Continue.\n")
print("Every 45 Minutes Later You Must Do Physical Exercise Or The Song Will Continue.\n")
This_is_date_and_time=str(datetime.datetime.now())
This_is_date_and_time1=str(time.asctime())
while(0<1):
    time.sleep(3)
    pygame.mixer.init()
    pygame.mixer.music.load("Water.mp3")
    pygame.mixer.music.set_volume(0.7)
    pygame.mixer.music.play()
    This_is_input=input("Enter 'Drank' if you have drunk water\n")
    if This_is_input=="Drank":
        pygame.mixer.music.pause()
        file1=open("Ex-7.1.txt","a")
        file1.write(f"The Time When you Have Drunk Water Is {This_is_date_and_time} And {This_is_date_and_time1}\n")
        file1.close()
        print(f"You Have Drunk Water Good. The Time When You Have Drunk Is {This_is_date_and_time} And {This_is_date_and_time1}")
        break
    else:
        continue
while(0<1):
    time.sleep(5)
    pygame.mixer.init()
    pygame.mixer.music.load("eyes.mp3")
    pygame.mixer.music.set_volume(0.7)
    pygame.mixer.music.play()
    This_is_input2=input("Enter 'Eydone' if you have done the eye exercise\n")
    if This_is_input2=="Eydone":
        pygame.mixer.music.pause()
        file2=open("Ex-7.2.txt","a")
        file2.write(f"You have done the eye exercise.The Time When You Have Done The Eye exercise is {This_is_date_and_time} And {This_is_date_and_time1}\n")
        file2.close()
        print(f"You Have Done The Eye Exercise.The Time When You Have Done The Eye Exercise Is {This_is_date_and_time} And {This_is_date_and_time1}\n")
        break
    else:
        continue
while(0<1):
    time.sleep(10)
    pygame.mixer.init()
    pygame.mixer.music.load("physical.mp3")
    pygame.mixer.music.set_volume(7.0)
    pygame.mixer.music.play()
    This_is_input3=input("Enter 'Exdone' if you done exercise\n")
    if This_is_input3=="Exdone":
        pygame.mixer.music.pause()
        file3=open("Ex-7.3.txt","a")
        file3.write(f"You Have Done The Physical Exercise.The Time When You Have Done The Physical exercise is {This_is_date_and_time} And {This_is_date_and_time1}\n")
        file3.close()
        print(f"Good You Have Done The Physical Exercise.The Time When You Have Done The Physical Exercise Is {This_is_date_and_time} And {This_is_date_and_time1}\n")
        break
    else:
        continue

'''
32.If Else & Elif In Python:-
'''
g=2
g=2
n=23
g=float(input())
if g>n:#This is used to write another answer if the answer is anthing else. 
    print("Greater")
elif g==n:
    print("equal")
else:
    print("Lesser")
'''
comments can interupt elif statement.



'''





'''
updated on 27/05/2020


   
##if g==n:
##    print("equal")
##elif g==n:
##    print("eqaual")



'''
list=[3,4,5,6]
##print(5 in list)
##print(15 in list)
if 5 in list:
    print("Yes it is in the list")
else:
    print("No it is not in the list")
if input("enter") in list:
    print("No it is not in list")
else:
    print("YEs")

























'''
33.If_main:-
'''
'''
DATE:-13/06/2020 Usage Of 'if__name__==__main__' In Python:-
DAY:-Saturday


'''
def printgun(str):
    return f"This is an example {str}"
def add(num1, num2):
    return num1+num2+5
'''
DATE:-14/06/2020
DAY:-Sunday

'''
if __name__=='__main__':
    print(printgun("Gunjan"))
    o=add(4, 6)
    print(o)

'''
34.Instance And Class Variables In Python:-
'''
'''
DATE:-20/06/2020 Instances And Class Variables In Python:-
DAY:-Saturday
'''
class Employee:
    no_of_leaves=8#This is same for every object
    pass
Gunjan=Employee()
Harry=Employee()
Gunjan.name="Gunjan"
Gunjan.salary=455
Gunjan.role="Instructor"
Harry.name="Harry"
Harry.salary=455
Harry.role="Student"
print(Employee.no_of_leaves)
print(Gunjan.__dict__)
Employee.no_of_leaves=9
print(Gunjan.__dict__)
print(Employee.no_of_leaves)
print(Employee.__dict__)

'''
35.Is_Vs_And_Equals_To_Difference_In_Python:-
'''
'''
DATE:-15/07/2020 'is' vs '=='.Difference In Python:-
DAY:-Wednesday
'''
'''
'=='-Defination:-Value Equality.Two objects have the same value.
'is'-Defination:-Reference Equality.Two references refer to the same object.
'''
a=[6,4,"34"]
b=[6,4,"34"]
print(b is a)

''''
36.Join Function In Python:-
'''
'''
DATE:-14/06/2020 Join Function In Python:-
DAY:-Sunday


'''
lis=["John","Cena","Randy",
     "orton","Sheamus","Khali","jinder mahal"]
##for item in lis:
##    print(item,"and",end=" ")
a=" , ".join(lis)
print(a,"other wwe superstars")
'''
The above program can be done through a join function in python.
The snytax of join function is '"_anyname_".join()'.

'''

'''
37.Json_Module_In_Python:-
'''
'''
DAY:-10/07/2020 Json Module In Python:-
DAY:-Friday
JSON:-Javascript Object Notation
'json.loads()' will convert a string into JSON string.
'json.dumps()' will convert a dictionary into json string or
javascript.
'''
import json
data='{"var1":"Gunjan","var2":56}'
print(data)
parsed=json.loads(data)
##print(type(parsed['var1']))
print(type(parsed))
data2={
    "Channel_name":"GunjanNayak",
    "Game":['Godofwar','Spiderman','Last_Of_Us-2'],
    "IOT_Device":('RedmiNote8Pro','Samsung_Laptop'),
    "isbad":False
    }
jscomp=json.dumps(data2)
print(type(jscomp))

'''
38.KBC:-
'''
import random
import time
##a=["Shikha","Gunjan","Anuska","Mridula","Oisi","Potai","Babun","Kalpana","Mouri","Tithi"]
##b=random.choice(a)
##c=input("Enter")
##while c==b:
##    print("Yes correct answer.")
##    break
##print(b)
##d=time.asctime()
##
##print(d)
a=random.randint(1,100)
while(True):
    b=int(input("Enter"))
    if b==a:
        print("Yes")
        break
    else:
        print(a)
        continue

'''
39.List Datatype And List Functions:-
'''
'''
This is a list in python.
We have to use bar brackets for list
We can use string,integer and float in a list in python.
We can also use slicing in a list.



'''


grocery=["Lifebouy","Vimbar","Deo",
        "Mutton",77]
print(grocery[:5])
##
num1=[2,3,4,5,6,7]
print(num1[::2])#This is extende slicing.
print(num1[::3])#This is extende slicing.
print(num1[::-2])#This is extende slicing.
print(num1[::-1])#This is extende slicing.#This is to reverse the list's elements.
print(num1[::-3])#This is extende slicing.
print(num1[::2])#This is extende slicing.

print(num1)
print(max(num1))#This is to find maximum
print(min(num1))#This is to find minimum elements in the list.
##num1.append(3)#This is to add an element in the list in the end.
##num1.append(3)#It can also be repited
##num1.append(3)
num1.insert(2,67)
'''
'.insert' function is used to insert an element in the list.
In the () we must write the element number then comma then type
the element(i.e, string,integer and float).

'''
num1.pop()#This is used to remove the last element in the list.
num1.remove(6)#This is to remove an element.
num1[1]=100#This '[]' is used to change the element in the list.
#Just write the element number in the '[]'.
print(num1)
a=1
b=2
a,b=b,a
temp=a
a=b
b=temp
print(a,b)
'''
The above is to swap a value.

'''
num1.pop
print(num1)







gunu=[2,7,3,45,20]
print(gunu.sort(),end="\n")
print(gunu)
gunu.sort#This is to sort the list(e.g,anything.sort i.e, .sort)in chronologica
#-l order.
gunu.reverse()#This is to reverse the list.
print(gunu)




'''

              THIS IS ALL A REVISION PRACTICE:-

DATE:-25/05/2020





'''
##
##
##
##list=["Horlicks","Sugar","Egg","Atta","Lifebouy","Salt","Butter","Milk","Ghee","Mutton","Rice","Colgate","Magi"]
##list.sort()
##print(list)
##list.reverse()
##print(list)
##list.remove("Atta")
##print(list)
##list.append(1)
##print(list)
##list.pop()
##print(list)
##list.sort()
##print(list)
##list.clear(1)
##print(list)
##tuple=(2,3,2)
##tuple.remove()
##print(tuple)
##


##g=1
##h=2
##g,h=h,g
##print(g,h)
##babu=[1,2,3]
##babu.copy(1)
##print(babu)
##



'''
40.Map,Filter And Reduce In Python:-
'''
'''
DATE:-15/06/2020 Map,Filter And Reduce In Python:-
DAY:-Monday
'''
numbers=["3","34","64"]
numbers=list(map(int,numbers))
##for i in range(len(numbers)):
##    numbers[i]=int(numbers[i])
##numbers[2]=numbers[2]+1
##print(numbers[2])
'''The above commented script can be esily written with
the use of map function.Map function is used to apply a function
in all the elements in a list.We can also use lambda function.
'''
def sq(a):
    return a*a
numbers[2]=numbers[2]+1
print(numbers[2])
print("New")
num=[2,3,4,5,6,7,8,9]
square=list(map(sq,num))
print(square)
'''
'
num=[2,3,4,5,6,7,8,9]
square=list(map(sq,num))
print(square)' this script runs the program to find the square.


'''
print("New1")
num=[2,3,4,5,6,7,8,9]
square=list(map(lambda x:x*x,num))
print(square)
print("New2")
def square(a):
    return a*a
def cube(a):
    return a*a*a
fun=[square,cube]
num=[2,3,4,5,6,7,8,9]
for i in range(5):
    val=list(map(lambda x:x(i),fun))
    print(val)
print("New3")
'''
Filter function is used filter.The snytax of filter function is
'filter(function or none,iterable)'.

'''
list1=[1,2,3,4,5,6,7,8,9]
def greater(num):
    return num>5
gr_than_5=list(filter(greater,list1))
print(gr_than_5)
print("New4")
'''
Reduce function
'
from functools import reduce
list1=[1,2,3,4]
num1=reduce(lambda x,y:x+y,list1)
print(num1)' this program is used to find the total sum value of
all the element in a list.


'''
from functools import reduce
list1=[1,2,3,4]
num1=reduce(lambda x,y:x*y,list1)
print(num1)







'''
41.Multiple_Inheritance_I_Python:-
'''
'''
DATE:-27/06/2020 Multiple Inheritance In Python(OOPs-8):-
DAY:-Saturday
'''
class Employee:
    no_of_leaves=8
    var=8
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves
    @classmethod
    def from_str(cls,string):
        return cls(*string.split("-"))
    @staticmethod
    def printgood(string):
        print("This is good" +string)
class player:
    var=9
    no_of_games=4
    def __init__(self,name,game):
        self.name=name
        self.game=game
    def printdetails(self):
        return f"The name is {self.name} and game is {self.game}"
class CoolProgrammer(player,Employee):
    language="C++"
    def printlanguage(self):
        print(self.language)
Gunjan=Employee("Gunjan",455,"Instructor")
rohan=Employee("Rohan",250,"Student")
shubham=player("Shubham",["Cricket"])
karan=CoolProgrammer("Karan","coolProgrammer")
####det=karan.printdetails()
##karan.printlanguage()
print(karan.var)

''''
42.Multlevel_Inheritance_In_Python_OOps_9:-
'''
'''
DATE:-28/06/2020 Multilevel Inheritance In Python(OOPs:-9):-
DAY:-Sunday
'''
class Dad:
    baskketball=1
class Son(Dad):
    dance=1
    baskketball=9
    def instance(self):
        return f"Yes I dance {self.dance} no of times"
class Grandson(Son):
    dance=6
    def instance(self):
        return f"Yeah"\
               f"Yes I dance very awesomly {self.dance} no of times"
Govinda=Dad()
Baba=Son()
Gunjan=Grandson()
print(Gunjan.baskketball)

'''
43.My Own Dictionary ex-1:-
'''
'''
DATE:-25/05/2020
'''
dict={"Crow":"It is a bird",
      "Tiger":"It is an animal that belongs to cat family.",
      "Computer":"It is a device to do multiple operations.",
      "Laptop":"It is a portable computer.",
      "Photo":"A picture or image."}
dict.update({"Addi":"Bye"})
print(dict[input("Enter the word which you want to find the meaning")])
print(dict)



'''
44.My_Own_Practice-1:-
''''
import pywhatkit as kit
##kit.playonyt("see you again")
kit.sendwhatmsg("+919092814699","This is a try",19,14)

'''
45.My_Personal_Practice:-
'''
'''
DATE:-01/06/2020 My_Personal_Pracice:-
DAY:-Wednesday
'''
##from random import choice as c
##elements=["W","S","G"]
##human_point=0
##while(True):
##    Input=str(input("Enter Your Value"))
##    Random=c(elements)
##    if Input==Random:
##        print("Correct")
##        break
##    else:
##        print("No")
##l=["hi","this"]
##a=l.append(input("Enter any thing"))
##if a is l:
##    print("Sorry It is in list")
##else:
##    print("Ok")
import requests
data=requests.get(str(input("Enter the url to download the website")))
with open(str(input("Enter the file name")),"wb") as f:
    f.write(data.content)

'''
46.new:-
'''
print('This is \\\\ double these are /\/\/\/\ mountains he is awesome \\" \\n \\t \\')

'''
47.Object_Introspection_OOPs_17:-
'''
'''
DATE:-04/07/2020 Object Introspection In Python OOPs-17:-
DAY:-Saturday
'''
class Employee:
    def __init__(self,fname,lname):
        self.fname=fname
        self.lname=lname
##        self.email=f"{fname}.{lname}@gunjannayak.com"
    def explain(self):
        return f"This employee is {self.fname} {self.lname}"
    @property
    def email(self):
        if self.fname==None or self.lname==None:
            return "Email is not set"
        return f"{self.fname}.{self.lname}@gunjannayak.com"
    @email.setter
    def email(self,string):
        print("Setting now...")
        name=string.split("@")[0]
        self.fname=name.split(".")[0]
        self.lname=name.split(".")[0]
    @email.deleter
    def email(self):
        self.fname=None
        self.lname=None
skillf=Employee("Skill","f")
##print(skillf.email)
##print(id("this is a string"))
##print(id("this that"))
##o="this is a string"
##print(dir(skillf))
import inspect
print(inspect.getmembers(skillf))
'''
Object Introspection  means to know the information of the object.
Every Object has an unique id.We can see it using 'id(Object_Name)'.
'dir(Object_Name)' is used to define the functions in the object.
'inspect' module is used to find all of the above mentioned in the
comment.
'''
print("new")
def fun(self):
    a=inspect.getmembers(self)
    print(f"This is the record {a}/n")
fun(skillf)

'''
48.Oh_Soldier_Prettify_My_Folder_Ex-8:-
'''
'''
DATE:-09/07/2020 Oh Soldier Prettify My Folder Ex-8:-
DAY:-Thursday
'''
import os
##Change=os.chdir(str(input()))
##print(os.listdir())
##Enter=open(input("Enter the dictionary file"),"r+")
##a=Enter.read().split("\n")
##b=str(a)
##b.capitalize()
##print(a)
##Enter.close()
def soldier(path,file,format):
    os.chdir(path)
    i=1
    files=os.listdir(path)
    with open(file) as f:
        filelist=f.read().split("\n")
    for file in files:
        if file not in filelist:
            os.rename(file,file.capitalize())
        if os.path.splittext(file)[1]==format:
            os.rename(file,f"{i}{format}")
            i+=1
print(soldier())

'''
49.OOPs_Library_Mini_Project-1:-
'''
##'''
##DATE:-04/07/2020 OOPs Library Mini Project-1:-
##DAY:-Saturday
##print("3.Kisholai")
##print("4.Parijat Readers")
##'''
##list1=["Shakespa"]
##def fun2():
##        print("1.Shakespare")
##        print("2.DRACULA")
##        print("3.Kisholai")
##        print("4.Parijat Readers")
##        print("5.Exit")
##print("List1")
##print("Enter Which One Of The Following Book You Want")
##print("1.Display Books")
##print("2.Lend Books")
##print("3.Add Books")
##print("4.Return Books")
##class Library:
##    def __init__(self,fname,flist,flibrary):
##        self.name=fname
##        self.list=flist
##        self.library=flibrary
##    def fun1(self):
##        return f"This is the name {self.name} and list is {self.list} and library is {self.library}"
##sk1=Library("Shakespare",100,"sk1")
##dra=Library("DRACULA",2,"dra")
##kis=Library("Kisholai",3,"kis")
##Par=Library("Parijat Readers",5,"Par")
##while(True):
##    UI1=int(input("Enter What You Want To Do From List1?"))
##    if UI1==1:
##        print("List2")
##        print("Enter The Book Name")
##        print(fun2())
##        while(True):
##            UI2=int(input("Enter which book you want to see from List2?"))
##            if UI2==5:
##                break
##            elif UI2==1:
##                print(Library.fun1(sk1))
##                break
##            elif UI2==3:
##                print(Library.fun1(kis))
##                break
##            elif UI2==2:
##                print(Library.fun1(dra))
##                break
##            elif UI2==4:
##                print(Library.fun1(Par))
##                break
##            else:
##                continue
##    elif UI1==2:
##        print("Which Book You Want To Lend")
##        print(fun2())
##        while(True):
##            UI3=int(input("Enter Which Book You Want To Lend From List3"))
##            if UI3==1:
##                Username=input("Enter Your Name")
##                
##                break
##            else:
##                continue
##    else:
##        continue
##        
'''
DATE:-18/07/2020 OOPs Library Mini Project In Python:-
DAY:-Saturnday
'''
class Library:
        def __init__(self,list,name):
                self.bookList=list
                self.name=name
                self.lendDict={}
        def displayBooks(self):
                print(f"We have the following books {self.name}.You can take the book now")
                for book in self.bookList:
                        print(book)
        def lendBook(self,user,book):
                if book not in self.lendDict.key():
                        self.lendDict.update({book:user})
                        print("Lender-Book database has been updated")
                else:
                        print(f"Book is already being used by {self.lendDict[book]}")
        def addBook(self,book):
                self.booklist.append(book)
                print("Book has been added to the book list")
        def returnbook(self,book):
                self.lendDict.pop(book)
if __name__=='__main__':
        Gunjan=Library(['Python','Kisholai','Shapspares','C++','Java','Harry Potter'],"Gunjannayak.com")
        while(True):
                print("Enter Which One Of The Following Book You Want")
                print("1.Display Books")
                print("2.Lend Books")
                print("3.Add Books")
                print("4.Return Books")
                user_choice=input()
                if user_choice not in ['1','2','3','4']:
                        print("Please Enter a valid operator")
                        continue
                else:
                        user_choice=int(user_choice)
                if user_choice==1:
                        Gunjan.displayBooks()
                elif user_choice==2:
                        book=input("Enter the name of the book you want to lend")
                        user=input("Enter your name")
                        Gunjan.lendBook(user,book)
                elif user_choice==3:
                        book=input("Enter the name of the book you want to add")
                        Gunjan.addBook(book)
                elif user_choice==4:
                        book=input("Enter the name of the book you want to return")
                        Gunjan.returnbook(book)
                else:
                        print("Not a valid option")
print("Press q to quit and c to continue")
user_choice2=""
while(user_choice2!="c" and user_choice2!="q"):
        user_choice2=input()
        if user_choice2=="q":
                exit()
        elif user_choice2=="c":
                continue

'''
50.opencv_module_ch-1:-
'''
'''
DATE:-26/07/2020 OpenCV Module In Python Full Tutorial:-
DAY:-Sunday
'''
import cv2

#---------Image--Capturing--------:-
##img=cv2.imread("My_image.jpg")#imports images
##cv2.imshow("My Image",img)#shows the output.
##cv2.waitKey(0)



#-------------Capturing-Video-----:-
##cap=cv2.VideoCapture("test-cv.mp4")
##while(True):
##    success,img=cap.read()
##    cv2.imshow("Video",img)
##    if cv2.waitKey(59) & 0xFF == ord('q'):
##        break



cap=cv2.VideoCapture(0)
cap.set(4,6400)
cap.set(4,4800)
cap.set(10,100)
while(True):
    success,img=cap.read()
    cv2.imshow("Video",img)
    if cv2.waitKey(0) & 0xFF==ord('q'):
        break
##print(cap)
##cap.set(3,640)
##cap.set(4,480)
##while(True):
##    success,img=cap.read()
##    cv2.imshow("Video",img)
##    if cv2.waitKey(59) & 0xFF == ord('q'):
##        break

'''
51.opencv_module_ch-2:-
'''
'''
DATE:-26/07/2020 Basic Functions of OpenCV:-
DAY:-Sunday
'''
import cv2
import numpy as np
img=cv2.imread("My_image.jpg")
kernel=np.ones((5,5),np.uint8)
imggrey=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
imgblur=cv2.GaussianBlur(imggrey,(7,7),0)
imgCanny=cv2.Canny(img,150,200)
imgdialation=cv2.dilate(imgCanny,kernel,iterations=1)
imgEroded=cv2.erode(imgdialation,kernel,iterations=1)
##cv2.imshow("Color change",imggrey)
##cv2.imshow("Blur change",imgblur)
cv2.imshow("Canny change",imgCanny)
cv2.imshow("Dilation change",imgdialation)
cv2.imshow("Eroded change",imgEroded)
cv2.waitKey(0)


'''
52.opencv_module_ch-3:-
'''
'''
DATE:-26/07/2020 Resizing And Cropping In Python OpenCV:-
DAY:-Sunday
'''
import cv2
img=cv2.imread("My_image.jpg")
print(img.shape)
imgResize=cv2.resize(img,(300,200))
cv2.imshow("Image",img)
cv2.imshow("Image Resize",imgResize)
cv2.waitKey(0)

'''
53.Operator_Overloading_And_Dunder_Method_OOPs_14:-
'''
'''
DATE:-01/06/2020 Operator Overloading And Dunder Method In Python OOPs-14:-
DAY:-Wednesday
'''
class Employee:
    no_of_leaves=8
    var=8
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves
    def __add__(self,others):
        return self.salary+others.salary
    def __truediv__(self,other):
        return self.salary/other.salary
    def __repr__(self):
        return  f"Employee('{self.name}',{self.salary},'{self.role}')"
    def __str__(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
emp1=Employee("Gunjan",455,"Programmers")
##emp2=Employee("rohan",5,"cleaner")
##print(emp1+emp2)
print(str(emp1))
'''
We can create a special method by typing double underscore in the first
and in the last without any gap.
'''

'''
54.Opirator In Python:-
'''
'''
DATE:-31/05/2020
Operators In Python:-
'''
#Arithmatic Operator
#Assignment Operator
#Comparison Operator
#Logical Operator
#Identity Operator
#Membership operator
#Bitwise Operator
#1.Arithmatic Operators
print("5+6 is",5+6)
print("5+6 is",5+6)
print("5+6 is",5+6)
print("5+6 is",5+6)
print("5 // 6 is",15//6)
print("5+6 is",5**56)#This is used to print power of any Integer or float.
##a=int(10)
##b=int(2)
##print(a**b)
print("5+6 is",5%2)#This '%' is used to print the remainder in the division.
#2.Assifnment Operators
print("Assignment Operators")
x=5
print(x)
x%=7#This is used to add,subtract,multiple and divide and many more in a value.
print(x)
#Comparison Operator
print("Comparison Operators")
i=5
print(i!=5)#This '==' is used to compare the value and '!' is used to say
#not equals to.And greater than and lesser than can also be used.
d=2
print(d and 5)
print("Logical Operatords")
c=True
e=False
print(c and c)
'''
'and' operator is used to return the value by multtpling it with another.
'or' operator ois used to return any value which is true.
'is not' is used to tell that "this is not this". 
'''
print("Identity Operators")
print(2 is not 5)
'''
'is not' is used to tell that "this is not this".
'''
print("Membership Operators")
list=[2,3,4,5,6,7]
print(344 not in list)
'''

This is used to find the element in the list.
We can also use 'not in'.
'''
print("Bitwise Operators")
print(0 & 1)
print(0|1)#This '|' means or in Bitwise Operator
































'''
55.OS_Module_In_Python:-
'''
'''
DATE:-09/07/2020 OS Module In Python:-
DAY:-Thursday
'''
import os
'''
'os.getcwd()' is used to see the current working directory.
'os.chdir("path")' is used to change the current working directory.
'os.listdir()' is used to see all the files and folders in the
current working directory.
'os.makdir("Folder_Name")' is used to create a folder in the
current working directory.
'os.makedirs("Folder_Name/Folder_Name")' is used to create
folders inside folder in the current working directory.
'os.rename("Folder_Or_File_Name","New_Name")' is used to rename
a folder or file in the current working directory.
'os.environ.get("Environment_Variable_Name")' is used to see
the environment variable in my pc.
'os.path.join("Path_Name","Next_Path_Name")' is used to join
two paths.
'os.path.exits("Path_Name")' is used to see that the given
path(i.e,"Path_Name") really exits in our pc or not.
'os.path.isdir("Directory_Name")' is used to see whether
the directory really exits or not in the current working
directory.
'''
##print(os.getcwd())
##os.chdir("C://")
##print(os.getcwd())
##f=open("does.txt")
##f.close()
##print(os.listdir("C://"))
##os.makedirs("This/that/that1")
##print(os.listdir())
##os.rename("Gunjan.txt","does.txt")
##print(os.environ.get("Path"))
##print(os.path.join("C://","/does.txt"))
##print(os.path.exists("C://"))
print(os.path.isdir("C://Program Files"))

'''
56.Pickling_Iris_Ex-10:-
'''
'''
DATE:-11/07/2020 Pickling Iris Ex-10:-
DAY:-Saturday
'''
import requests
import pickle
data=requests.get("https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data")
with open("Iris.text","wb") as f:
    f.write(data.content)
##a=str(data.text).split("','\n\n")
a=str(data.text)
a.splitlines()
red=[[i] for i in a]
file="Pic_Iris.pkl"
fileobj=open(file,"wb")
pickle.dump(red,fileobj)
fileope=open(file,"rb")
b=pickle.load(fileope)
print(b)
fileobj.close()

'''
57.Polymorphism_In_Python_OOPs_11:-
'''
'''
DATE:-29/06/2020 Polymorphism In Python OOPs-11:-
DAY:-Monday
'''
class Employee:
    no_of_leaves=8#This is called as public variable
    var=8
    _protect=4#This is a protected variable in oops
    __private=98#This is a private variable.It should start with double '__'.
    def __init__(self,aname,asalary,arole):
        self.name=aname
        self.salary=asalary
        self.role=arole
    def printdetails(gunu):
        return f"Name is {gunu.name} salary is {gunu.salary} and role is {gunu.role}"
    @classmethod
    def change_leaves(cls,newleaves):
        cls.no_of_leaves=newleaves
    @classmethod
    def from_str(cls,string):
        return cls(*string.split("-"))
    @staticmethod
    def printgood(string):
        print("This is good" +string)
emp=Employee("Gunjan",455,"Programmer")
print(emp._Employee__private)
print(5+6)
print("5"+"6")
'''
The meaning of polymorphism is different types or kinds of
a variable in Object Oriented Programming(OOPs) in Python.
'''

'''
58.POST:-
'''
import requests
f=open("test.txt")
for item in f:
    a=f.read()
    payload={f'email':{a},'pass':'test'}
f.close()
r=requests.post('http://localhost:10080/php%20tutorials/Test.php/post',data=payload)
print(r.text)

Final Words:-

"Thanks for taking a look of my code and hope you have used my code in your works!!!"

'''
Check out my new post on:-Free cheat sheet of gitlab