OPERATORS AND EXPRESSIONS
roll=input("roll number")
e=eval(input("Enter marks of eng"))
a=eval(input("Enter marks of math"))
s=eval(input("Enter marks of science"))
num=(e+a+s)
Per=((num*100)/300)
print(“total marks”, num)
print("percentage", Per)
print("Temperature Converter")
a=eval(input("Temperature in Celsius"))
b=(9/5)*a
f=b+32
print("Temperature in Fahrenheit", f)
print("Solving Quadratic Equation")
a=eval(input("Enter coefficient of x^2: "))
b=eval(input("Enter coefficient of x: "))
c=eval(input("Enter constant value: "))
d=b**2
f=4*a*c
h=d-f
x1=(-b+h**0.5)/(2*a)
x2=(-b-h**0.5)/(2*a)
print("First root: ", x1)
print("Second root: ", x2)
p=eval(input("Length of a"))
b=eval(input("Length of b"))
c=eval(input("Length of c"))
s=(p+b+c)/2
Area=((s*(s-p)*(s-b)*(s-c))**0.5)
print("the Area is: ", Area)
p=eval(input("Enter Principal:"))
r=eval(input("Enter Rate of Interest:"))
t=eval(input("Enter the time period:"))
s=(p*r*t)/100
print("Simple Interest: ", s)
c=(p*(1+r/100)**t)
print("Compound Interest: ", c)
n=(input("Enter Employee Name"))
a=eval(input("Enter Employee Number"))
b=eval(input("Enter Basic"))
m=eval(input("Enter HRA"))
k=eval(input("Enter DA"))
l=eval(input("Enter IT"))
tot=(b+m+k)-l
print("NET SALARY", tot)
input("Item name: ")
input("Item number: ")
a=eval(input("Price per item: "))
b=eval(input("Quanity: "))
d=eval(input("Discount: "))
f=a*b
m=d*a
e=m//100
p=f-e
print("FINAL AMOUNT:", p)
s=int(input("Enter time in seconds: "))
h=s//3600
m=s%3600
m1=m//60
s2=m%60
print("Time: ", "Hours:", h, "Minutes:", m1, "Seconds:", s2)
a=eval(input(“enter length in metres”))
b=a*100
print(“length in centimetres is”, b))
num=eval(input("Enter a 3 digit number: "))
a=num%10
num=num//10
b=num%10
num=num//10
print("The sum of the digits is: ", a+b+num)
Post a Comment
Please Do not Comment link and spam Comment.