Script-based language means the language that will be executed by the Interpreter. The interpreter will execute the code line by line, Script-based language does not contain any separate compiler to convert the code. the compiler will be in-built under the interpreter.
PHP, PYTHON, RUBY, JS, JQUERY, ANGULAR, NODE, REACT all are script-based languages.
Initially, a Python script was developed to create a device driver-based software system for the different operating systems.
But now Python is complete technology or platform which contain multiple library, framework, and support to create application software.
using Python script We can create the following application.
1 Desktop Application:-
This type of application will be installed separately on each machine. without using the internet this type of software will work.
Similar to Notepad, MS-OFFICE, Antivirus, FIREWALL, Billing System.
Technology:- TKINTER, PYQT
2 WEB APPLICATION:- the application that will be executed by the Internet or Intranet is called a Web application.
2 WEB APPLICATION:- the application that will be executed by the Internet or Intranet is called a Web application.
example Youtube, Twitter
Framework - Django, Pyramid, Flask
3 Mobile Application:- Python provides touch panel-based UI implementation using the KIVY framework.
3 Mobile Application:- Python provides touch panel-based UI implementation using the KIVY framework.
Twitter, Instagram
Framework:- KIVY
4 Data Science:- for data analysis, data engineering, Data visualization, Data Operation
Library:- SCIPY, NUMPY, MATPLOTLIB, PANDA, PANDAS,
5 Machine Learning:- Dynamic programming of Data Science
Tools:- SCI-KIT LEARN
6 IoT based application:- Internet of things, Home automation
7 Cloud-Based application:- Cloud means an open platform that can provide common accessibility to user's from any device.
4 Data Science:- for data analysis, data engineering, Data visualization, Data Operation
Library:- SCIPY, NUMPY, MATPLOTLIB, PANDA, PANDAS,
5 Machine Learning:- Dynamic programming of Data Science
Tools:- SCI-KIT LEARN
6 IoT based application:- Internet of things, Home automation
7 Cloud-Based application:- Cloud means an open platform that can provide common accessibility to user's from any device.
Python support all popular cloud platform
AWS, Microsoft AZURE, Google Cloud, etc
8 Game-based application
Pygame library for game development
pygame library is used to create a Python Game application.
pygame library is used to create a Python Game application.
9 Device Driver:- wi-fi, Bluetooth, sensor
10 Firewall & Security
ASSIGNMENTS:-
WAP to calculate difference of two date in year, date should be assigned on ddmmyyyy
12052016
13062019
o/p 2019-2016 3
WAP to calculate the sum of all digits in date of birth?
WAP to Convert feet to inch and inch to feet?
WAP to convert km to meter?
WAP to convert decimal to binary?
WAP to calculate basic, ta, da, comm, pf, HRA, Leave, numberofleave will be entered by the users?
basic = 5000
ta = basic*(2/100)
da = basic*(5/100)
comm = basic*(5/100)
emppf = basic*(8.33/100)
employerpf = basic*(3.67/100)
hra = basic*(10/100)
advancesal=500
nl =3
tsal = basic+ta+da+comm
leave = tsal/30
ctc = basic+ta+da+comm+emppf+hra
grosssal = tsal - emppf - (nl-1)*leave-advancesal
print("Package is ",12*ctc)
print("Gross salary is ",grosssal)
print("Leave Deduction days ",nl-1," and amount is ",(nl-1)*leave)
print("Pf Deduction is ",emppf)
print("Ta is ",ta,"\n da is ",da, "\n comm is ",comm,"\n hra is ",hra,"\n Advance Salary is ",advancesal)
number = 123
ردحذفrev_num = 0
while (number > 0) :
rev_num = (rev_num*10) + number%10
number = (int)(number/10)
print(rev_num)
This program should be created without loop and if use loop then use indentation
ردحذفnum =123
ردحذفa = num%10 #3
num= num//10 #12
b= num%10 #2
c=num//10 #1
rev = a*100+b*10+c*1
print(rev)
What is Interpreter and script both are same?
ردحذفProgram of Compund Interest?
ردحذفp=1000000
r=7.5
t=20
n=12
R = r/100
ci= p*((1+R/n)**(n*t))
print("Total amount including interest is ",ci,"\n interest ",(ci-p))
# area of traingle
ردحذفl=int(input("enter length value=") )
b=int(input("enter breath value="))
area=1/2*l*b
Print("enter length value=" , "enter breath value= , area)
#reverse number using While loop
ردحذفnumber=123
rev_num=0
while(number>0):
rev_num=(rev_num*10)+number%10
number=(int)(number/10)
print(rev_num)
#compount interest program
ردحذفp=15000
r=7.5
t=3
n=12
R=r/100
ci=p*((1+R/n)**(n*t))
print("Total ammount including interest is ",ci,"/n interest",(ci-p))
# Difference between two date in year
ردحذف# created by Shiva
firstdate = int("02061998") #ddmmyyyy
lastdate = int("03072021")
f1 = firstdate%10000
print(f1)
f2 = lastdate%10000
print(f2)
year = f2-f1
print(year)
#Program of Compund Interest
ردحذفp=1000000
r=7.5
t=20
n=12
R = r/100
ci= p*((1+R/n)**(n*t))
print("Total amount including interest is ",ci,"\n interest ",(ci-p))
# area of traingle
ردحذفl=int(input("enter length value=") )
b=int(input("enter breath value="))
area=1/2*l*b
Print("enter length value=" , "enter breath value= , area)
# Difference between two date in year
ردحذفfirstdate = int("02061998") #ddmmyyyy
lastdate = int("03072021")
f1 = firstdate%10000
print(f1)
f2 = lastdate%10000
print(f2)
year = f2-f1
print(year)
#wap find square and cube of number
ردحذفa=5
print(a*a)
print(a*a*a)
#swap of two number using third variable in jupyter
ردحذفa=10
b=20
print("before swap")
print(a,b)
temp=a
a=b
b=temp
print("after swap")
print(a,b)
#reverse 5 digits number without loop
ردحذفmun=int(input("enter any number:-"))
a=mun%10
mun=mun//10
b=mun%10
mun=mun//10
c=mun%10
mun=mun//10
d=mun%10
mun=mun//10
e=mun%10
mun=mun//10
print(a,b,c,d,e)
#WAP to display the middle number is a three-digit number?
ردحذفa=int(input("enter the value"))
b=int(input("enter the second value"))
c=a%10
a=a//10
c=a%10
d=b%10
b=b//10
d=b%10
print("the first mid no is",c ,"the second mid no is",d)
#WAP to calculate Square and Cube of any assigned number.
ردحذفa=int(input("enter number for square and cube"))
square=(a*a)
print("the assgined square is",square)
cube=(a*a*a)
print("the Assgined cube is",cube)
#Area of Tringle
ردحذفb=10
h=20
Area=(b*h)/
/2
print(Area)
#Adding complex number using complex number
ردحذفA=2+4J
B=4+5J
c=A+B
print(A)
print(B)
print("addition of complex number", c)
print(c)
#convert temperature from Celsius to Fahrenheit?
ردحذف'''formula --> fahrenheit = (celsius * 1.8) + 32'''
celsius=float(input(" Temperature in Celsius : "))
fahrenheit=(celsius*1.8)+32
print("{0} degree Celsius is equal to {1} degree Fahrenheit".format (celsius,fahrenheit))
#calculate Simple Interest where rate and time will be constant and
ردحذفthe principal will be an integer
CONST = (2.5,4.5)
p=450000
si = (p*CONST[0]*CONST[1])/100
print(si)
ردحذف#Program to calculate AREA of Triangle,RECT and CIRCLE?
CONST = (3.14,200,50)
r = 5
height=20
width=300
areaOfCircle = CONST[0]*r*r
areaOfTriangle = (CONST[1]*height)/2
areaOfRectangle = width*CONST[2]
print("Area of Cirlce is",areaOfCircle)
print("Area of Triangle is",areaOfTriangle)
print("Area of Rectangle is ",areaOfRectangle)
#calculate the total salary of an employee where basic, ta, da, comm, pf,hra, leave will be entered by the users
ردحذفbasic_salary = int(input("enter ur basic salary: "))
ta = int(input("enter ur ta: "))
da = int(input("enter ur da: "))
comm = int(input("enter ur comm: "))
pf = int(input("enter ur pf amount: "))
num_of_leave = int(input("enter ur num of leave: "))
leave_amount = num_of_leave*((basic_salary+ta+da+comm+pf)/30)
net_salary =basic_salary + ta + da + comm + pf - leave_amount
print("ur net salary=",net_salary)
#WAP to evaluate the middle number in three-digit numbers based on order?
ردحذفx = int(input("Enter 3 digit number = "))
a = x % 100
b = a // 10
print("Middle number is = ",b)
#multiplication of a complex number:-
ردحذفa=2+5j
b=4+6j
print("a=",a)
print("b=",b)
c=(a*b)
print("multiplication of a complex number:",c)
#WAP to calculate difference of two date in year.
ردحذفfstdate=int(input("enter the first date of birth in ddmmyyyy"))
lstdate=int(input("enter last date of birth in ddmmyyyy"))
f1=fstdate%10000
f2=lstdate%10000
year=(f1-f2)
print("%d" % year)
#WAP to calculate sum of all digit in date of birth.
ردحذفnum=int(input("enter dob in form of ddmmyyyy"))
a=num%10000
num1=num//10000
b=num1%100
num2=num1//100
c=num2%10
sum=a+b+c
print(sum)
#WAP to Convert feet to inch and inch to feet?
ردحذف#inch==feet*12
feet=float(input("enter the value"))
inch=feet*12
print("the value of inch is ",inch)
# WAP to convert km to meter?
ردحذف#1km=1000 meters
km=float(input("enter km"))
meter=km*1000
print("the value in meter is ",meter)
#WAP to Convert to inch to feet .
ردحذف#feet==inch/12
inch=float(input("enter the value of inch"))
feet=inch/12
print("the convertion inch to feet is ",feet)
#WAP to Convert to inch to feet .
ردحذف#feet==inch/12
inch=float(input("enter the value of inch"))
feet=inch/12
print("the convertion inch to feet is ",feet)
#WAP to calculate difference of two date in year.
ردحذفfirstdate=12052017
nowdate=28092021
f1= (firsdate%1000)
print (f1)
f2=(nowdate%1000)
print (f2)
year=f2-f1
print(year)
#WAP to convert km to meret .
ردحذفkm=int(input("enter km"))
meter=km*1000
print(meter)
#addition of dob of yash
ردحذفdob=10091997
a=dob%10 #7
dob=dob//10 #1009199
b=dob%10 #9
dob=dob//10 #100919
c=dob%10 #9
dob=dob//10 #10091
d=dob%10 #1
dob=dob//10 #1009
e=dob%10 #9
dob=dob//10 #100
f=dob%10 #0
dob=dob//10 #10
g=dob%10 #0
dob=dob//10 #1
h=dob%10
dob=dob//10
print(a+b+c+d+e+f+g+h)
#output is 36
#WAP to convert km to meret .
ردحذفkm=int(input("enter km"))
meter=km*1000
print(meter)
#WAP to convert km to meret .
ردحذفkm=int(input("enter km"))
meter=km*1000
print(meter)
# difference of two date in year
ردحذفpritesh=int("01111997")
shlok=int("25111999")
p=pritesh%10000
s=shlok%10000
diff=s-p
print("Difference of two date in year is:",diff)
# sum of DOB
ردحذفp=int("12111997")
a=p%10 #7
p=p//10 #1211199
b=p%10 #9
p=p//10 #121119
c=p%10 #9
p=p//10 #12111
d=p%10 #1
p=p//10 #1211
e=p%10 #1
p=p//10 #121
f=p%10 #1
p=p//10 #12
g=p%10 #2
p=p//10 #1
print("Sum of dob is ",a+b+c+d+e+f+g+p)
# conversion into km to meter
ردحذفa=float(input("Enter distance in KM:"))
M=1000*a
print(M)
convert decimal to binary
ردحذفa=bin(5)
print(a)
#program to calculate difference between two dates in year
ردحذفdate1 = int(input("Enter First Date in ddmmyyyy"))
date2 = int(input("Enter Last Date in ddmmyyyy"))
y1=date1 % 10000
y2=date2 % 10000
diff = y2-y1
print("Difference between two date in year is ",diff)
#program to calculate sum of all digit in dob
ردحذفdob = int(input("Enter date of birth in ddmmyyyy"))
a = dob%10 # 2
dob = dob//10 # 1001199
b = dob%10 # 9
dob = dob//10 #100119
c = dob%10 #9
dob = dob//10 #10011
d = dob%10 #1
dob = dob//10 #1001
e = dob%10 #1
dob = dob//10 #100
f = dob%10 #0
dob = dob//10 #10
g = dob%10 #0
h = dob//10 #1
s = a+b+c+d+e+f+g+h
print(s)
1.WAP to calculate difference of two date in year, date should be assigned on ddmmyyyy
ردحذفfrom datetime import date
firstdate = int("12052016") #ddmmyyyy
lastdate = int("13062019")
f1 = firstdate%10000
print(f1)
f2 = lastdate%10000
print(f2)
year = f2-f1
print(year)
1.WAP to calculate the sum of all digits in date of birth?
ردحذفnum = int(input("Enter your birth year: "))
x = num //1000
print(x)
x1 = (num - x*1000)//100
print(x1)
x2 = (num - x*1000 - x1*100)//10
print(x2)
x3 = num - x*1000 - x1*100 - x2*10
print(x3)
x4 = x+x1+x2+x3
print ("sum of all digits in your birth year",x4)
3.WAP to Convert feet to inch and inch to feet?
ردحذفfeet = int(input("Enter the length in feet:"))
# convert feet to Inches
Inch = 12 * feet;
print("The length in Inches is", round(Inch, 2))
Inches = int(input("Enter the value of length in Inches:"))
# convert Inches to Feet
Feet = Inches / 12;
print("The length in Feet", round(Feet, 2))
4.WAP to convert km to meter?
ردحذفkm=int(input("Enter Kilo Meters:"))
m=km*1000
print(m)
decimal number
ردحذفnumber = int(input("Enter any decimal number: "))
# print equivalent binary number
print("Equivalent Binary Number: ", bin(number))
decimal number
number = int(input("Enter any decimal number: "))
# print equivalent binary number
print("Equivalent Binary Number: ", bin(number))
ردحذف1.WAP to calculate the sum of all digits in date of birth?
num = int(input("Enter your birth year: "))
x = num //1000
print(x)
x1 = (num - x*1000)//100
print(x1)
x2 = (num - x*1000 - x1*100)//10
print(x2)
x3 = num - x*1000 - x1*100 - x2*10
print(x3)
x4 = x+x1+x2+x3
print ("sum of all digits in your birth year",x4)
************************************************************************************************************
2.WAP to calculate difference of two date in year, date should be assigned on ddmmyyyy
date1 = int(input("Enter First Date in ddmmyyyy"))
date2 = int(input("Enter Last Date in ddmmyyyy"))
y1=date1 % 10000
y2=date2 % 10000
diff = y2-y1
print("Difference between two date in year is ",diff)
or
firstdate = int("02061998") #ddmmyyyy
lastdate = int("03072021")
f1 = firstdate%10000
print(f1)
f2 = lastdate%10000
print(f2)
year = f2-f1
print(year)
****************************************************************************************************************
3.WAP to Convert feet to inch and inch to feet?
feet = int(input("Enter the length in feet:"))
# convert feet to Inches
Inch = 12 * feet;
print("The length in Inches is", round(Inch, 2))
Inches = int(input("Enter the value of length in Inches:"))
# convert Inches to Feet
Feet = Inches / 12;
print("The length in Feet", round(Feet, 2))
***************************************************************************
4.WAP to convert km to meter?
km=int(input("Enter Kilo Meters:"))
m=km*1000
print(m)
*****************************************************************************
5.WAP to convert decimal to binary?
decimal number
number = int(input("Enter any decimal number: "))
# print equivalent binary number
print("Equivalent Binary Number: ", bin(number))
******************************************************************************
WAP to calculate basic, ta, da, comm, pf, HRA, Leave, numberofleave will be entered by the users?
print("SALARY PROGRAM")
name= str(input("Enter name of employee:"))
basic=float(input("Enter Basic Salary :"))
da=float(basic*0.25)
hra=float(basic*0.15)
pf=float((basic+da)*0.12)
ta=float(basic*0.075)
netpay=float(basic+da+hra+ta)
grosspay=float(netpay-pf)
print("\n\n")
print("S A L A R Y D E T A I L E D B R E A K U P ")
print("==============================================")
print(" NAME OF EMPLOYEE : ",name)
print(" BASIC SALARY : ",basic)
print(" DEARNESS ALLOW. : ",da)
print(" HOUSE RENT ALLOW.: ",hra)
print(" TRAVEL ALLOW. : ",ta)
print("==============================================")
print(" NET SALARY PAY : ",netpay)
print(" PROVIDENT FUND : ",pf)
print("==============================================")
print(" GROSS PAYMENT : ",grosspay)
print("==============================================")
************************************************************************************
1.WAP to calculate the sum of all digits in date of birth?
ردحذفnum = int(input("Enter your birth year: "))
x = num //1000
print(x)
x1 = (num - x*1000)//100
print(x1)
x2 = (num - x*1000 - x1*100)//10
print(x2)
x3 = num - x*1000 - x1*100 - x2*10
print(x3)
x4 = x+x1+x2+x3
print ("sum of all digits in your birth year",x4)
************************************************************************************************************
2.WAP to calculate difference of two date in year, date should be assigned on ddmmyyyy
date1 = int(input("Enter First Date in ddmmyyyy"))
date2 = int(input("Enter Last Date in ddmmyyyy"))
y1=date1 % 10000
y2=date2 % 10000
diff = y2-y1
print("Difference between two date in year is ",diff)
or
firstdate = int("02061998") #ddmmyyyy
lastdate = int("03072021")
f1 = firstdate%10000
print(f1)
f2 = lastdate%10000
print(f2)
year = f2-f1
print(year)
****************************************************************************************************************
3.WAP to Convert feet to inch and inch to feet?
feet = int(input("Enter the length in feet:"))
# convert feet to Inches
Inch = 12 * feet;
print("The length in Inches is", round(Inch, 2))
Inches = int(input("Enter the value of length in Inches:"))
# convert Inches to Feet
Feet = Inches / 12;
print("The length in Feet", round(Feet, 2))
***************************************************************************
4.WAP to convert km to meter?
km=int(input("Enter Kilo Meters:"))
m=km*1000
print(m)
*****************************************************************************
5.WAP to convert decimal to binary?
decimal number
number = int(input("Enter any decimal number: "))
# print equivalent binary number
print("Equivalent Binary Number: ", bin(number))
******************************************************************************
WAP to calculate basic, ta, da, comm, pf, HRA, Leave, numberofleave will be entered by the users?
print("SALARY PROGRAM")
name= str(input("Enter name of employee:"))
basic=float(input("Enter Basic Salary :"))
da=float(basic*0.25)
hra=float(basic*0.15)
pf=float((basic+da)*0.12)
ta=float(basic*0.075)
netpay=float(basic+da+hra+ta)
grosspay=float(netpay-pf)
print("\n\n")
print("S A L A R Y D E T A I L E D B R E A K U P ")
print("==============================================")
print(" NAME OF EMPLOYEE : ",name)
print(" BASIC SALARY : ",basic)
print(" DEARNESS ALLOW. : ",da)
print(" HOUSE RENT ALLOW.: ",hra)
print(" TRAVEL ALLOW. : ",ta)
print("==============================================")
print(" NET SALARY PAY : ",netpay)
print(" PROVIDENT FUND : ",pf)
print("==============================================")
print(" GROSS PAYMENT : ",grosspay)
print("==============================================")
************************************************************************************
#shalu
ردحذفnch =int("enter the value of inch")
feet= inch % 12
print("the convertion inch to feet is",feet)
#shalu
ردحذفdef getdifference(dt1,dt2):
dt1=[12,5,2016]
dt2=[13,6,2019]
print("difference between two dates is",getdifference(dt1,dt2))
#shalu
ردحذفa=123
print(a)
num1=a%10
a=int(a/10)
num2=a%10
num3=a//10
res=num1*100+num2*10+num3*1
print(res)
#second method
b=45678
print(b)
num1=b%10
b=(b//10)
num2=b%10
b=(b//10)
num3=b%10
b=(b//10)
num4=b%10
b=(b//10)
num5=b%10
b=(b//10)
res=num1*10000+num2*1000+num3*100+num4*10+num5*1
print(res)
#shalu
ردحذف#sum
num=27091995
a=num%1000
num=num//1000
b=num%100
num=num//100
c=num%10
sum=a+b+c
print(a+b+c)
WAP to calculate the sum of all digits in date of birth?
ردحذفnum = int(input("Enter your birth year: "))
x = num //1000
print(x)
x1 = (num - x*1000)//100
print(x1)
x2 = (num - x*1000 - x1*100)//10
print(x2)
x3 = num - x*1000 - x1*100 - x2*10
print(x3)
x4 = x+x1+x2+x3
print ("sum of all digits in your birth year",x4)
************************************************************************************************************
wap to calculate the total salary of an employee where basic ,ta, da,comm,pf,hra,leave,advance salary will be entered by the users?
حذفbasic=5000
ta=basic*(2/100)
da=basic*(5/100)
comm=basic*(5/100)
emppf=basic*(8.33/100)
employerpf=basic*(3.67/100)
hra=basic*(10/100)
advancesal=500
nl=3
tsal=basic+ta+da+comm
leave=tsal/30
ctc=basic+ta+da+comm+emppf+hra
grossal=tsal-emppf-(nl-1)*leave-advancesal
print("package is",12*ctc)
print("gross salary is",grossal)
print("leave deduction days,nl-1" and "amount is",(nl-1)*leave)
print("pf diduction is",emppf)
print("ta is",ta,"/n da is" ,da,"/n comm is",comm,"/n hra is",hra,"/n advance salary is",advancesal)
#Difference of two date in year?
ردحذفfirstdate=int(input("enter first dob in ddmmyyyy"))
seconddate=int(input("enter second dob in ddmmyyyy"))
f1=firstdate%10000
print(f1)
f2=seconddate%10000
print(f2)
year=f2-f1
print(year)
#sum of all digits in dob
ردحذفnum = int(input("enter dob in from of ddmmyyyy"))
r1=num%10000
num1=num//10000
print(r1 ,num1)
r2=num1%100
num2=num1//100
print(r2,num2)
r3=num2%10
print(r3)
sum = r1+r2+r3
print(sum)
#convert inch to feet
ردحذفinch = float(input("enter a value "))
feet = inch//12
print(feet)
#convert feet to inch?
ردحذفfeet=float(input("enter the value"))
inch=feet*12
print(inch)
#Decimal to binary?
ردحذفnum=12
s=""
a=num%2#0
s=s+str(a)
num=num//2#6
a=num%2#0
s=s+str(a)
num=num//2#3
a=num%2#1
s=s+str(a)
num=num//2#1
a=num%2#1
s=s+str(a)
print(s)
#reverse a nos
ردحذفnum=123
a=num%10
b=num//10
c=b//10
d=b%10
print(a*100+d*10+c*1)
dn=int(input("Enter any no"))
ردحذفrem=0
bn=0
place=1
while(dn!=0):
rem=dn%2
bn=bn+(rem*place)
place=place*10
dn=dn//2
print(bn)
ردحذفup=float(input("enter price")) #unit price
cons=float(input("enter consumption")) #consumption
load=float(input("enter extra load unit"))
bill=up*cons
print("Total bill without load=",bill)
bill2=2*up*load
print("extra load bill=",bill2)
bill3=up*cons+2*(up*load)
print("Total bill with extra load=",bill)
أزال المؤلف هذا التعليق.
ردحذفfirstdate = int(input("enter firstdate"))
ردحذفlastdate = int(input("enter lastdate"))
a1= firstdate%10000
a2 = lastdate%10000
year=a2-a1
print(year)
أزال المؤلف هذا التعليق.
ردحذفأزال المؤلف هذا التعليق.
ردحذف#WAP to calculate the sum of all digits in date of birth?
ردحذفdob=12012001
a=dob%10 #1
dob=dob//10 #1201200
b=dob%10 #0
dob=dob//10 #120120
c=dob%10 #0
dob=dob//10 #12012
d=dob%10 #2
dob=dob//10 #1201
e=dob%10 #1
dob=dob//10 #120
f=dob%10 #0
dob=dob//10 #12
g=dob%10 #2
dob=dob//10 #1
h=dob%10
dob=dob//10
print(a+b+c+d+e+f+g+h)