Skip to main content

Posts

Numpy Library

 Hello Guys, In this blog we will learn about the most important library of python which is NUMPY.  What is numpy? Numpy is a python library that provides a multidimensional array object. It provide fast operations on array. With the help of this library we can do mathematical, logical and basic statistical operation on array.  To use numpy library we have to install it in our machine so that we can use this library. To install this library just insert the following command into your command prompt or terminal.  >>> pip install numpy Now you can easily access the numpy library. How to create 1D Array In the above image, first we import the numpy library. Then with the help of array method we can create the numpy array.  On line no. 2 we create the one dimensional array. In this array you can store integers, float etc. In the array  method we must have to pass list to create a array.  How to create 2D Array                           In the above figure we create a 2D or 2 dimen

Simple Calculator Using Python

      Simple Calculator Using Python      Hello friends in this blog we will learn how we can create simple calculator using python. To create calculator we required Tkinter library which is built-in library of python. With the help of this library we can create GUI of the application.  To create calculator we follow some steps:- 1) Import all required libraries and create the basic window:- 2) Add required widgets to window:- In this step add number and operators buttons to the window. 3) Create function for each button:- In this step create separate functions for 0 to 9 numbers, operator (+,-,*,/), equals, clear buttons.      i] Function for 0 to 9 numbers:- Here we create one function for 0 to 9 numbers. We pass number as a parameter to function so that one function is enough for 0 to 9 number buttons.      ii] Function for operators(+,*,-,\):- Here we create separate functions for each operator.                          iii] Function for equal button:- In this function actual cal

Translator App using Tkinter

  Translator App using Tkinter Hello Friends in this blog we will learn how we can create our own translator application using python gui package  Tkinter . Tkinter is the built in python package which provide us to create some applications.  Steps to create Translation application 1. Import require packages or libraries: To import google_trans_new you must have to install this library.  How to install this library and how it works ? click here 2. Create a basic GUI for our application: With the help of google_trans_new we get the languages automatically. 3. Create a function  Output: YouTube Video Link Click Here

Python API For Google Translate

 Python Google Translate API Hello Friends in this blog we will learn about Python API for translation. With the help of this API we can translate any language like google translator. The name of this API is google-trans-new. How to install this API: >>> pip install google_trans_new Insert this command in your command prompt to install this. How it works: To know the languages :                      It returns the dictionary of the languages. How to translate: The syntax of translate method is  translator.translate(text, lang_tgt, lang_src) Here, Text = Sentence/text which you want to translate. lang_tgt = key of that language in which you want to translate your text. lang_src = The language of your text. It takes auto by default.

Rock Paper and Scissor Game Using Tkinter | Python |

 Rock Paper and Scissor Game Using Tkinter Hello Friends in this blog we will learn how to create Rock Paper & Scissor game using tkinter. Tkinter provides GUI toolkit. Tkinter is a built in library of python with the help of this we can create so many GUI applications. To create Rock Paper & Scissor game their are some conditions: Rock + Paper => Paper Win Rock+Scissor =>Rock Win Rock+Rock => Match Draw Paper+Rock => Paper win Paper+Scissor=> scissor win Paper+Paper => Draw Scissor+Paper => Scissor Win Scissor+Rock => Rock Win Scissor+Scissor =>Match Draw Our complete project is depend on this conditions. Steps to complete this project: 1. Import require modules and library 2. Create Basic GUI window for our projects: 3. Declare the values for computer & score of player and computer: 4. Create a function for Rock: 5. Create Function for Paper: 6. Create a function for Scissor: 7. Create a function to reset our game: This is code snippets of this

Mail Sending Using Tkinter

 Mail Sending Using Tkinter In this Blog We will learn how to send email through tkinter. Tkinter provides GUI toolkit. With the help of this we can create so many GUI applications.  In this blog we create the mail sending application using tkinter. Steps of the project: 1. Import required packages and library 2. Create basic GUI 3. Add required widgets to GUI. 4. Create a function for mail sending. 1. Import required packages and library: 2. Create basic GUI: 3.  Add required widgets to GUI.: 4. Create a function for mail sending. Output: smtplib: smtplib is the python built in library for sending and receiving the mail. SMTP stands for Simple Mail Transfer Protocol.  smtplib.SMTP(domain,port):  In this method add domain which you want for example gmail.com. SMTP has three ports which are 25, 465 and 587 by using this three ports we can send the mail.  smtplib.login(userid,password): This method logins to your account.And send mail from this email id.  smtplib.sendmail(sender,to,mess

Countdown Timer Using Tkinter

Countdown Timer Using Tkinter With the help of tkinter we create a countdown timer project for beginners. Tkinter is the built in python package. Tkinter provides GUI (Graphical User Interface)toolkit. With the help of this developer can create any GUI projects.  Steps of the Project: 1. import tkinter package 2. create a basic gui  3. add entry for Hrs, Mins, & Secs. and start button 4.  Create a function containing logic of timer   Step 1: Importing required packages   Step 2: Create Basic GUI  Step 3: Adding entry for Hrs. Mins. & Secs. and declare variable to store this values. Step 4: Create a function to perform timer. This is how we create countdown timer using python tkinter.  In this project we use divmod() function. This function helps to calculate quotient and remainder both. for example:- 1.print(divmod(25,5)) => (5,0) 2.print(divmod(5,2)) => (2,1) In the first example 25 is divided by 5 so quotient is 5 & remainder is 0. and same in second example 5 is di

Contact Form

Name

Email *

Message *