Posts
My Python codes
Git Commands.
- Get link
- X
- Other Apps

Git Commands This is a complete list of commands which you will need to keep in mind. While using git. git confing --global user.name anant = For setting name for first time git confing --global user.email xyz@gmail.com = For setting Email. git config --global user.name = For getting name git config --global user.email = For getting email git init = For making the git repository at that directory. git add --a OR git add -A = For adding all untracked files to work stage git commit -m "Second commit new features added" = for committing the stage files repository. git status = For looking untracked files or not committed files on repository. git log = For looking all history commit's. rm -rf .git = For deleting all info about that repository which were in .git folder. ls = For looking all files in present working directory. pwd = For looking present working directory. git clone [Link of a repository from github] = For cloning means to download a copy from github to your pw...
Health care notifier system | Made with python
- Get link
- X
- Other Apps
Health care notifier system Code - ------------------------------ import time from playsound import playsound from plyer import notification def water (): time.sleep( 60 * 30 ) print ( "It's water time.." ) playsound( 'D: \\ game sounds \\ water.mp3' ) notification.notify( title = "** It's water time **" , message = "Drink 1 glass of water from your bottle.... And enjoy programming..." , app_icon = "app icon's path.ico" , timeout = 12 ) def eyes (): time.sleep( 60 * 5 ) print ( "It's eyes exercise time.." ) playsound( 'D: \\ game sounds \\ eyes.mp3' ) notification.notify( title = "** It's eye's exercise time **" , message = "Look 20 feets away for next 20 seconds from now... And enjoy programming..." , app_icon = "app icon's ...
Function cashing and drinking water desktop notification system.
- Get link
- X
- Other Apps
Function cashing and drinking water Desktop notification system. Code - --------------------------------------------- import time from functools import lru_cache from plyer import notification @lru_cache ( maxsize = 5 ) def nacho (n): time.sleep(n) return n # if __name__ == '__main__': # print("Ek run ho hai") # print(nacho(3)) def water_drinker (): print ( "This Water notification system." ) while True : time.sleep( 15 ) notification.notify( title = "** It's water time **" , message = "Drink 1 glass of water from your bottle.... And enjoy programming..." , app_icon = "full path.ico" , timeout = 10 ) water_drinker()
Shopping Bill Generator In python.
- Get link
- X
- Other Apps
Shopping Bill Generator made with python. Code - -------------------------------------- def receipt_generator (): items = [] prices = [] print ( "Enter the name of item and price separating each other by a '-' eg- 'Tomato-56'" ) print ( "Enter 'q' at the place of items to stop item adding in receipt" ) try : while True : a = input () if a == 'q' : break else : items.append(a) print ( "Anant Kirana Store \n " ) for item in items: b = item.split( "-" ) item = b[ 0 ] price = b[ 1 ] prices.append(price) print ( f"Item = { item } , { price } " ) n = 0 for item in prices: item = int (item) n += item print ( f"Total = { n }\n " ) if n > 0 : print ( "Thanks fo...
Can we get a job in google in after BCA ? How ?
- Get link
- X
- Other Apps
Can we get a job in google in after BCA ? How ? Getting a job in Google or any Big Company after doing BCA Now, that's a question of my interest. I'm in third year of BCA and there was a time when I was absolutely obsessed with getting a job at Google (someday). First of all, Google is not the garden you hear about in fairy tales. Research well and think more than just once if you'll be comfortable for their work culture. As far as the jobs are concerned, I'd say there is a possibility. Google is known to hire people with rather something unexplainable here educational background; so there is a good possibility that BCA, no matter however small it may appear to you, may still make a mark. Other than that, it's not entirely necessary for you to go and apply for a technical job at Google as soon as you graduate. Did you consider studying further or trying out other jobs and then diving into Google someday? Well! I have. Now that all's been said, here is what I...
I made a to do list system in python.
- Get link
- X
- Other Apps
To do list system in python Code - ------------------------------------ def main_function (): """This function basically add and remove your task from a list..""" to_do_list = [] while ( True ): a = input ( "What you want to do? \n 1- Adding elements in to do list. \n 2- Have completed a task in to do list.. \n 3- To show to do list. \n " ) if a == '1' : while ( True ): element = input ( "Enter the task which you want to add in to do list: " ) to_do_list.append(element) opinion = input ( "Wanna add one more task then press enter otherwise enter 1: " ) if opinion == '' : continue else : break elif a == '2' : while ( True ): print (to_do_list) remove_element = int ( input ( "Enter the inde...
Different ways to clear a list in python.
- Get link
- X
- Other Apps
Different ways to clear a list in python Code - -------------------------------------- # Different ways to clear a list in python # Method 1 list3 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] def list_cleaner (list): list.clear() print ( "Before: " , list3) list_cleaner(list3) print ( "After: " , list3) # Method 2 list4 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] print ( "Before: " , list4) list4 = [] print ( "After: " , list4) # Method 3 list3 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] def list_cleaner5 (list): """This function will clear the list you put as an argume...
Python program to check that a list have elements in it or not .
- Get link
- X
- Other Apps
Python program to check that a list have elements in it or not. Code - -------------------------------- # Python program to check that a list have elements in it or not . list2 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] def element_absence_checker (list): a = input ( "Enter the name of element which you want to check:- " ) for i in list: if i == a: print ( "Element present in list.." ) break else : print ( "Element doesn't present in list." ) element_absence_checker(list2)
Should we start preparation for BCA/MCA from class 11th ? How ?
- Get link
- X
- Other Apps
Should we start preparation for BCA/MCA from class 11th ? How ? There isn't much to prepare for BCA/MCA while in class 11th. Just few basics thing to take in mind. Anyhow, Try that you have Computer science in class 11. While all works fine, both computer science and maths are pretty useful. Maths not so much as computer science but will definitely be useful. Science or other subjects aren't really needed that much in most times and if needed you can always learn the topic later on or take help from a knowledgeable person in that field. Make sure to learn at least few programming languages and polish your skills on it. Do focus on algorithm part - That's important. Try to learn different but revelant topics like Cloud Computing or Artificial Intelligence, Cryptography, Networking, etc. Do the one that will be best for you(Depending on which career you want to go for). You can and actually should learn basics behind how actually computers and rest of stuff work. You will be...
Python program to interchange first and last elements in a list.
- Get link
- X
- Other Apps
Online Library system | Made with python
- Get link
- X
- Other Apps
Online Library system Code -- ------------------------------- import time def getdate(): return time.asctime() class Library: # list_of_books = ["S.Sc. All in one", "Maths R.D. Sharma", "D.K.", "Maths N.C.E.R.T."] def __init__(self, book_list, library_name): self.list_of_books = book_list self.library_name = library_name def display_book(self): print("Displaying...") time.sleep(1) return f"{self.list_of_books}\n" def lend_book(self): name = input("Enter your name: ") name_of_book = input("Enter the name of book which you want to borrow: ") if name_of_book not in self.list_of_books: print("Book not available !! or incorrect book name entered !!") ...
Diamond Shape problem in python.
- Get link
- X
- Other Apps
Diamond Shape problem in python. Code - ------------------------------------- class A: def met(self): return "Hello this is a diamond shape problem of class A" class B(A): def met(self): return "Hello this is a diamond shape problem of class B" class C(A): def met(self): return "Hello this is a diamond shape problem of class C " class D(B, C): def met(self): return "Hello this is a diamond shape problem of class D" a = A() b = B() c = C() d = D() print(d.met())
Over & Super in python.
- Get link
- X
- Other Apps
Over & Super in python. Code - ------------------------------ class A : classvar1 = "Class variable of class A" def __init__ ( self ): self .var1 = "Instance variable of class A" self .special = "This is special variable" self .instance_variable = "Instance variable of class A" class B (A): classvar1 = "Class variable of class B" def __init__ ( self ): self .var1 = "Instance variable of class B" self .instance_variable = "Instance variable of class B" super (). __init__ () # print(super(B, self).classvar1) hello = A() by = B() # print(by.special) print (by.var1, by.instance_variable) # print(by.var1) # print(by.classvar1)
Single Inheritance, multiple inheritance and multilevel inheritance in python.
- Get link
- X
- Other Apps
Multilevel inheritance in python A program as an example. Code - -------------------------------- class ElectronicDevice: refrigerator = 1000 def __init__(self, name, watt): self.name = name self.watt = watt def rupee_checker(self): a = 283 if self.watt < 1000: return f"Your Electrical Device consumes less than {a} units per year." elif self.watt > 1000: return f"Your Electrical Device consumes more than {a} units per year." elif self.watt == 1000: return f"Your Electrical Device consumes {a} units per year." class PocketGadget(ElectronicDevice): MaH = 3000 def __init__(self, name, mah): se...
Using class objects, Instance variables, and class variables, class methods and static method in python
- Get link
- X
- Other Apps
Using class objects, Instance variables, and class variables, class methods and static method in python Code - ------------------------------------ class Students: number_of_buildings = 4 # def Majra(self): # return f"Number of toys are {self.toys}, and number of buildings are {self.number_of_buildings}" def __init__(self, name, aclass, section, rollnumber, school, stream): self.name = name self.standard = aclass self.section = section self.Roll_number = rollnumber self.School = school self.stream = stream def eye_checker(self): return f"Class is {self.standard}, and name is {self.name}" @classmethod def hello(cls, no_of_new_buildings): cls.numb...
Song player | Made by python
- Get link
- X
- Other Apps
Song player Obviously it's not that much perfect as windows or phone's music player's are but for me it's enough to use in this we can play music specifically and in mixture also.. ------------------------------------------- from playsound import playsound opinion = input ( "In which type you want to listen songs.. \n 1: For specifically.. \n 2: For mix continiously... \n " ) if opinion == '1' : print ( "Songs available \n 1: Alan Walker - Fade \n 2: Alan Walker - Force \n 3: Alan Walker - Spectre \n 4: Cartoon - On & On \n 5: Different Heaven & EH!DE - My Heart \n 6: Jarico - Landscape " ) song = input ( "Enter the number of song which you want to here \n " ) if song == "1" : print ( "Playing..." ) playsound( 'D: \\ d data \\ tunes 3 \\ Alan Walker - Fade [NCS Release].mp3' ) elif song == "2" : print ( "Playing..." ) pl...
Health Management System | Made with python.
- Get link
- X
- Other Apps
Health Management System This system basically works for 3 persons Harry, Rohan and Hammad. Their food and exercise is recorded. ----------------------------- def getdate (): import datetime return datetime.datetime.now() def see (a): if a== '1' : h= input ( "For food enter f and for exercise enter e: " ) if h== "f" : with open ( "harry-food.txt" ) as f: content = f.read() print (content) elif h== "e" : with open ( "harry-exercise.txt" ) as f: content = f.read() print (content) else : print ( "Enter f or e !" ) elif a== '2' : r = input ( "For food enter f and for exercise enter e: " ) if r == "f" : with open ( "rohan-food.txt" ) as f: content = f.read() print (content) ...