Skip to main content

Posts

How to make calculator in python kivy

  How make calculator in python We make a calculator in python using kivy module . Kivy module helps us to make android apps . First wait , If you run a kivy program in your terminal then you see a error like this To solve this problem you have to go kivy docs and follow the instruction of kivy docs.  First we have to make a virtual environment and then in the virtual environment you have to install kivy . After that you have to write  kivy_venv\Scripts\activate in your terminal and then run the file . If this method not work then write the comment below. LETS START CODING First we import kivy .For this we hve to write  from  kivy.app  import  App from  kivy.uix.label  import  Label from  kivy.uix.button  import  Button from  kivy.core.window  import  Window from  kivy.uix.gridlayout  import  GridLayout from  kivy.uix.widget  import  Widget from  kivy.lang  import ...
Recent posts

How to make face recognizer in python

Face Recognizer in python We make a face recognition program in python with the help of opencv .  Opencv module is used in face detection and face recognition .  Lets Strat Coding First , we have to import opencv . For this we have to write  import  cv2 After this we have to write  cap = cv2.VideoCapture( 0 ) Now, we have to go the folder where the opencv is installed and open the folder data . After this copy the all xml haarcascade file and paste it in our working folder where we making face detection program  . After this we have to load facedectector and eyedetector . For this we have to write  facedetector=cv2.CascadeClassifier( 'Cascades/haarcascade_frontalface_default.xml' ) eyedetector=cv2.CascadeClassifier( 'Cascades/haarcascade_eye.xml' ) After this we make while loop . In this while loop we draw a rectangle around the face and eye in each frame and the show the frame . For this we have to write  while  ( True ):  ...

How to make snake game in python

  How to make snake game in python  We make snake game in python with help of pygame module. pygame module helps in making games in python .  LETS START CODING  Import pygame and random we have to import pygame and random module for making snake game. Random module helps to generate random position for food in the screen. for this we have to write  import  pygame import  random Creating game window First we have to make game screen with the help of pygame. For this we have to write  screen_widht= 460 screen_height= 600 gameWindow=pygame.display.set_mode((screen_widht,screen_height)) pygame.display.set_caption( "SNAKE GAME" ) pygame.display.update() Creating welcome screen  First we have to display welcome screen. For display screen we have to make a function . For this we have to write  def   welcome ():     exit_game= False      while   not  exit_game:     ...

How to make multiplication table in java

  Multiplication table in java We can make java program which take number as a input and display the multiplication table of the input number . Lets start coding first , we have to input a number from user. After that we have to start a while loop and multiply the number and print the number . HERE ARE THE CODE import java.util.Scanner; public class table{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the number you want to make multiplication table :"); int number = sc.nextInt(); int i = 1; while (i Copy it OUTPUT

How To Make Audiobook in python

  What is Audiobook? Audiobook is a recording of book . Recording of book contain the content of book . Audiobook read the book content . We not need to read a book . We only listen the audiobook. How to make Audiobook in python We make audiobook in python which read the content of book . For this we have to write some line of code to make program which read the book in python. LETS START CODING  First we have to import pyttsx3 , PyPDF2  and tkinter.filedialog . For this we have to write  import  pyttsx3 import  PyPDF2 from  tkinter.filedialog  import  * After this we have to take input book name which is in pdf format from the user and read the input book. or this we have to write  book = askopenfilename() pdfreader = PyPDF2.PdfFileReader( open (book,  'rb' )) pages = pdfreader.numPages print  ( "NOTE : counting start from 0" ) i =  int ( input ( "Enter the...

HOW TO MAKE 3D MODEL OF MOON MOVE AROUND THE EARTH IN PANDA3D

How to make 3d model of moon which move around the earth in panda 3d We make 3d model of moon which move around the earth with help of panda3d .  We write some lines of code in python to make the model of moon . LETS START CODING First we have to  from  direct.showbase.ShowBase  import  ShowBase from  panda3d.core  import  PointLight , AmbientLight After this we have to make class which inherit from a ShowBase class. After this we have to make constructor . Now , we have to load the model of earth and moon and the texture of earth. For this we have to write           self .moon =  self .loader.loadModel( "models/sphere" )          self .moon.setScale( 3 , 3 , 3 )          self .moon.reparentTo( self .render)                   ...

HOW TO MAKE 3D MODEL OF EARTH IN PANDA 3D

How to make 3d model of Earth in panda 3d We make 3d Earth model with help of panda 3d . Panda 3d is a module which is use to make 3d games . To make 3d Earth model we have to write some lines of code. LETS START CODING import panda 3d We need to import ShoeBase  from the panda 3d module. For this we have to write  from  direct.showbase.ShowBase  import  ShowBase After this we have to make class which inherit from ShowBase class . After making class we have to make constructor . Loading the texture and model After doing this we have to load texture and earth model .For this we have to write  self .tex= self .loader.loadTexture( "world.jpg" )          self .earth= self .loader.loadModel( "models/earth" )          self .earth.setTexture( self .tex)          self .earth.setScale( 5 , 5 , 5 )          s...

how to make multiplication table in python

Multiplication table in python We can make python program which take number as a input and display the multiplication table of the input number . Lets start coding first , we have to input a number from user. After that we have to start a while loop and multiply the number and print the number . HERE ARE THE CODE number=int(input("Enter the number you want to table:")) i=0 while i Copy it OUTPUT

HOW TO MAKE ROCK PAPER SCISSOR GAME IN JAVA

   What is Rock Paper Scissor game? Rock paper scissor game is hand game played between two players ,in each player at the same time forms one of three shapes. Rock Paper Scissor game in java  When we want to rock paper scissor game with computer what we do for this  we make a computer program with the help of java. LETS START CODING We use while loop to play  game five times after that calculate the points of both user and computer then print the winner and there points. In this game we take 0  for stone,  1 for paper,  2 for scissor. import java.util.Random We have to   import random module to generate the computer choice. simply ,we have to write  import   java . util . Random ;  to import random module. Taking user input  For taking input from the user we have to import  import   java . util . Scanner ; After that we have to write  System . out . println ( "Enter your...