• Offers
    • RegisterLogin
      • Learn More
    PythonPoint.netPythonPoint.net
    • Offers
    • RegisterLogin
      • Learn More

      Python

      SKILL IS IMPORTANT THAN DEGREE Be skill full.
      • Home
      • Blog
      • Python
      • How to Create a Software using Python

      How to Create a Software using Python

      • Posted by Python Point Team
      • Categories Python
      • Date December 31, 2022
      • Comments 0 comment
      how to create a software using python

      Let’s make a simple software of our own using Python. We will be making a simple calculator software. Once you get the basics, its no time for to stop. Work on interesting ideas and create a software on your own.

      To interact with the users you need an Interface to communicate, i.e. a Graphical User Interface. There are many modules in the python which you can import and code your GUI. Tkinter is the built-in GUI for the python, so we will be using Tkinter here.

      from tkinter import *
      
      #refers to class in Tkinter module
      top = Tk()
      
      #Label is the method to print a text in
      L1 = Label(top, text="HI")
      L1.pack( side = LEFT)
      
      #Entry method to create a blank entry
      E1 = Entry(top, bd =5)
      E1.pack(side = RIGHT)
      
      #Button method to create a button
      B=Button(top, text ="Hello",)
      B.pack()
      top.mainloop()

      When you run the above piece of code, you will get the output as shown below. Upon this code, we will built our software.

      After entering 2 numbers and specifying the operation in between them, the answer has to be printed or displayed in the answer entry.

      The final code will be:

      from tkinter import *
      
      def proces():
          number1=Entry.get(E1)
          number2=Entry.get(E2)
          operator=Entry.get(E3)
          number1=int(number1)
          number2=int(number2)
          if operator =="+":
              answer=number1+number2
          if operator =="-":
              answer=number1-number2
          if operator=="*":
              answer=number1*number2
          if operator=="/":
              answer=number1/number2
          Entry.insert(E4,0,answer)
          print(answer)
      
      #refers to class in Tkinter module
      top = Tk()
      
      L1 = Label(top, text="My calculator",).grid(row=0,column=1)
      L2 = Label(top, text="Number 1",).grid(row=1,column=0)
      L3 = Label(top, text="Number 2",).grid(row=2,column=0)
      L4 = Label(top, text="Operator",).grid(row=3,column=0)
      L4 = Label(top, text="Answer",).grid(row=4,column=0)
      E1 = Entry(top, bd =5)
      E1.grid(row=1,column=1)
      E2 = Entry(top, bd =5)
      E2.grid(row=2,column=1)
      E3 = Entry(top, bd =5)
      E3.grid(row=3,column=1)
      E4 = Entry(top, bd =5)
      E4.grid(row=4,column=1)
      B=Button(top, text ="Submit", command = proces).grid(row=5,column=1,)
      
      top.mainloop()

      Outputs:

      • Share:
      author avatar
      Python Point Team

      Previous post

      How to create a registration form using python?
      December 31, 2022

      Next post

      How to create a Text file in Python
      December 31, 2022

      You may also like

      15 Powerful Step for Mastering JSON Parsing in Python: Boosting Data Manipulation and Validation
      21 June, 2023

      Introduction In the world of programming, data plays a crucial role, and managing it efficiently is of utmost importance. JSON (JavaScript Object Notation) has emerged as a popular data interchange format due to its simplicity and flexibility. In this article, …

      Introduction to Transfer Learning with Python: A Practical Guide
      31 December, 2022

      Introduction: Definition of transfer learning Overview of how transfer learning works in the context of machine learning Why transfer learning is useful and important Section 1: Transfer learning in Python with Keras In this section, we will explore how to …

      How to Check Type in Python
      31 December, 2022

      In this article, we will learn to check type in Python. The built-in function type() can be used to check the type of data in Python.

      Subscribe
      Login
      Notify of
      Please login to comment
      0 Discussion
      Inline Feedbacks
      View all comments

      Latest Courses

      (Hindi) Ways to earn minimum 1 Lakh Per month as Programmer

      (Hindi) Ways to earn minimum 1 Lakh Per month as Programmer

      ₹10,000
      (HINDI) Full Stack Web Development In Python 3.8 And Django 3.1

      (HINDI) Full Stack Web Development In Python 3.8 And Django 3.1

      ₹25,000 ₹2,500

      Latest Posts

      • 15 Powerful Step for Mastering JSON Parsing in Python: Boosting Data Manipulation and Validation
      • Introduction to Transfer Learning with Python: A Practical Guide
      • How to Check Type in Python
      • How to make web crawler in python?
      • Why was the language called “python”?
      Contact
      •   support@pythonpoint.com

      We get you the best Python Courses and Blogs aiming to provide skill.

      We Believe Skill is much more important than a Degree

      Company
      • About Us
      • Blog
      • Offers
      • Contact
      Useful Links
      • Courses
      Support
      • Need Support

      © 2020 ALL RIGHTS RESERVED​ PYTHONPOINT.NET

      PythonPoint

      • Terms of Use
      • Refund Policy
      • Privacy Policy

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account

      Are you a member? Login now

      wpDiscuz