Friday, 20 September 2019

Write a program to calculate Simple interest and Compound interest using Loop conditioning

def SI(x):
    print("SI")
    for i in range(1,x+1):
        P=int(input("ENTER P VALUE "))
        R=int(input("ENTER R VALUE "))
        T=int(input("ENTER T "))
        Si=(P*R*T)/100
        print("SI = ",Si)

def CI(x):
    print("CI")
    for i in range (1,x+1):
        P=int(input("ENTER P VALUE "))
        R=int(input("ENTER R VALUE "))
        n=int(input("ENTER n "))
        Ci=P*(1+(R/100))**n
        print("CI",Ci)
#MAIN PROGRAM
x=int(input("ENTER X VALUE ="))
print(x)
ch=int(input("ENTER A CHOICE"))
if ch==1:
    SI(x) #calling function simple interest
elif ch==2:
    CI(x) #calling function compound interest

Tuesday, 17 September 2019

12th Networking


What is traceroute?
Traceroute is a widely used command line utility available in almost all operating systems. It shows you the complete route to a destination address. It also shows the time taken (or delays) between intermediate routers. Isn’t it great? Below is an example on Windows operating System.


ping  

Ping is a basic Internet program that allows a user to verify that a particular IP address exists and can accept requests.

ipconfig

Ipconfig (sometimes written as IPCONFIG) is a command line tool used to control the network connections on Windows NT/2000/XP machines. There are three main commands: "all", "release", and "renew". Ipconfig displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays the IP addresssubnet mask, and default gateway for all adapters.

nslookup

nslookup is the name of a program that lets an Internet server administrator or any computer user enter a host name (for example, "whatis.com") and find out the corresponding IP address or domain name system (DNS) record. The user can also enter a command for it to do a reverse DNS lookup and find the host name for an IP address that is specified.


Python program to print all the numbersdivisible by 3 and 5 for a given number

# Python program to print all the numbers
# divisible by 3 and 5 for a given number
  
# Result function with N
def result(N):
      
    # iterate from 0 to N
    for num in range(N):           
            # Short-circuit operator is used 
            if num % 3 == 0 and num % 5 == 0:
                print(str(num) + " ", end = "")
                  
            
      
#main program
N = 100
  
# Calling function
result(N)

Monday, 9 September 2019

11TH CS PYTHON PROJECTS


1. STUDENT MANAGEMENT SYSTEM: CLICK HERE

12TH CS PYTHON PROJECTS 21019-20

PROJECT FORMAT: CLICK HERE

1. BANK TRANSACTION USING SQL CONNECTIVITY AND PYTHON : CLICK HERE
Students: 1.Master. Ashish   I/c    2. Master. Jatin  3. Master. Sacheth

2. ALUMNI MANAGEMENT SYSTEM USING SQL CONNECTIVITY AND PYTHON : CLICK HERE
Students: 1.Master. Aniket   I/c    2. Master. Abhinav   3. Master. Vabhav Dashila

HOTEL MANAGEMENT USING SQL CONNECTIVITY AND PYTHON: 
CLICK HERE
Students: 1.Master. Abhineet   I/c    2. Master. Mukund   3. Master. Jashan

4. STOCK MANAGEMENT
Students: 1.Master. Apar  I/c    2. Master. V. Rohilla   3. Master. Ravi P

5. Age calculator using Tkinter library
Students: 1.Master. Nikhil  I/c    2. Master. Vasu   3. Master. Swapnil

6. SCHOOL MANAGEMENT
Students: 1.Master. Prateek  I/c    2. Master. Priyanshu   3. Master. Gebin

7. SCIENTIFIC CALCULATOR USING TKINTER LIBRARY
Students: 1.Master. Mohith  I/c    2. Master.                 3. Master.    

8. GAMES
Students: 1.Master. Yasin  I/c    2. Master. Someshwaran   3. Master.  Venkatnath 

9. Project
Students: 1.Master. Ohm Prakash  I/c    2. Master. Uthsav   3. Master.   

10. Project; Fashion Store

Students: 1.Master. Brij Bhusan  I/c    2. Master. Takshith   3. Master.    

Project: Sales and Inventory: Click Here




Friday, 6 September 2019

Prog-11 Create a graphical application that accepts user inputs, performs some operation on them, and then writes the output on the screen. For example, write a small calculator. Use the tkinter library.

Python | Simple GUI calculator using Tkinter

Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter outputs the fastest and easiest way to create the GUI applications. Creating a GUI using tkinter is an easy task.
To create a tkinter :
  1. Importing the module – tkinter
  2. Create the main window (container)
  3. Add any number of widgets to the main window
  4. Apply the event Trigger on the widgets.
Let’s create a GUI based simple calculator using Python Tkinter module, which can perform basic arithmatic operations addition, subtraction, multiplication and division.
Below is the implementation :

# importing Tkinter and math
from tkinter import *
import math
 
# calc class
class calc:
 
    def getandreplace(self):
 
        """replace x with * and ÷ with /"""
        self.expression = self.e.get()
        self.newtext=self.expression.replace('/','/')
        self.newtext=self.newtext.replace('x','*')
 
 
    def equals(self):
        """when the equal button is pressed"""
        self.getandreplace()
        try:
            # evaluate the expression using the eval function
            self.value= eval(self.newtext) 
        except SyntaxError or NameError:
            self.e.delete(0,END)
            self.e.insert(0,'Invalid Input!')
        else:
            self.e.delete(0,END)
            self.e.insert(0,self.value)
 
    def squareroot(self):
        """squareroot method"""
        self.getandreplace()
        try:
            # evaluate the expression using the eval function
            self.value= eval(self.newtext) 
        except SyntaxError or NameError:
            self.e.delete(0,END)
            self.e.insert(0,'Invalid Input!')
        else:
            self.sqrtval=math.sqrt(self.value)
            self.e.delete(0,END)
            self.e.insert(0,self.sqrtval)
 
    def square(self):
        """square method"""
        self.getandreplace()
        try:
            #evaluate the expression using the eval function
            self.value= eval(self.newtext) 
        except SyntaxError or NameError:
            self.e.delete(0,END)
            self.e.insert(0,'Invalid Input!')
        else:
            self.sqval=math.pow(self.value,2)
            self.e.delete(0,END)
            self.e.insert(0,self.sqval)
 
    def clearall(self):
            """when clear button is pressed,clears the text input area"""
            self.e.delete(0,END)
 
    def clear1(self):
            self.txt=self.e.get()[:-1]
            self.e.delete(0,END)
            self.e.insert(0,self.txt)
 
    def action(self,argi):
            """pressed button's value is inserted into the end of the text area"""
            self.e.insert(END,argi)
 
    def __init__(self,master):
            """Constructor method"""
            master.title('Calulator')
            master.geometry()
            self.e = Entry(master)
            self.e.grid(row=0,column=0,columnspan=6,pady=3)
            self.e.focus_set() #Sets focus on the input text area
 
            # Generating Buttons
            Button(master,text="=",width=11,height=3,fg="blue",
                   bg="orange",command=lambda:self.equals()).grid(
                                     row=4, column=4,columnspan=2)
 
            Button(master,text='AC',width=5,height=3,
                          fg="red", bg="light green",
             command=lambda:self.clearall()).grid(row=1, column=4)
 
            Button(master,text='C',width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.clear1()).grid(row=1, column=5)
 
            Button(master,text="+",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action('+')).grid(row=4, column=3)
 
            Button(master,text="x",width=5,height=3,
                    fg="blue",bg="orange",
                    command=lambda:self.action('x')).grid(row=2, column=3)
 
            Button(master,text="-",width=5,height=3,
                    fg="red",bg="light green",
                    command=lambda:self.action('-')).grid(row=3, column=3)
 
            Button(master,text="÷",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action('/')).grid(row=1, column=3)
 
            Button(master,text="%",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.action('%')).grid(row=4, column=2)
 
            Button(master,text="7",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action('7')).grid(row=1, column=0)
 
            Button(master,text="8",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.action(8)).grid(row=1, column=1)
 
            Button(master,text="9",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action(9)).grid(row=1, column=2)
 
            Button(master,text="4",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.action(4)).grid(row=2, column=0)
 
            Button(master,text="5",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action(5)).grid(row=2, column=1)
 
            Button(master,text="6",width=5,height=3,
                   fg="white",bg="blue",
                   command=lambda:self.action(6)).grid(row=2, column=2)
 
            Button(master,text="1",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.action(1)).grid(row=3, column=0)
 
            Button(master,text="2",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action(2)).grid(row=3, column=1)
 
            Button(master,text="3",width=5,height=3,
                   fg="white",bg="blue",
                   command=lambda:self.action(3)).grid(row=3, column=2)
 
            Button(master,text="0",width=5,height=3,
                   fg="white",bg="blue",
                   command=lambda:self.action(0)).grid(row=4, column=0)
 
            Button(master,text=".",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.action('.')).grid(row=4, column=1)
 
            Button(master,text="(",width=5,height=3,
                   fg="white",bg="blue",
                   command=lambda:self.action('(')).grid(row=2, column=4)
 
            Button(master,text=")",width=5,height=3,
                   fg="blue",bg="orange",
                   command=lambda:self.action(')')).grid(row=2, column=5)
 
            Button(master,text="?",width=5,height=3,
                   fg="red",bg="light green",
                   command=lambda:self.squareroot()).grid(row=3, column=4)
 
            Button(master,text="x²",width=5,height=3,
                   fg="white",bg="blue",
                   command=lambda:self.square()).grid(row=3, column=5)
 
# Driver Code
root = Tk()
 
obj=calc(root) # object instantiated
 
root.mainloop()

output

result


input data