0% found this document useful (0 votes)
14 views3 pages

Python 3.11.9 Basic Calculations

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Python 3.11.9 Basic Calculations

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.

1938 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("MAKWANA MIHIR 24BCH199")
MAKWANA MIHIR 24BCH199
>>> A=6
>>> B=4
>>> A+B
10
>>> A-B
2
>>> A*B
24
>>> A/B
1.5
>>> A**B
1296
>>> A//B
1
>>> hours=int(input("enter the hours:" ))
enter the hours:7
>>> minutes=hours*60
>>> minutes
420
>>> minutes=int(input("enter the minutes:"))
enter the minutes:120
>>> hours=minutes/60
>>> hours
2.0
>>> dollar=int(input("enter the dollar:"))
enter the dollar:10
>>> rupees=dollar*85
>>> rupees
850
>>> rupees=int(input("enter the rupees: "))
enter the rupees: 510
>>> dollar=rupees/85
>>> dollar
6.0
>>> dollar=int(input("enter the dollar: "))
enter the dollar: 100
>>> pound=dollar*0.82
>>> pound
82.0
>>> kgs=int(input("enter the kgs: "))
enter the kgs: 7
>>> grams=kgs*1000
>>> grams
7000
>>> grams=int(input("enter the grams: "))
enter the grams: 3000
>>> kgs=grams/1000
>>> kgs
3.0
>>> byte=int(input("enter the byte: "))
enter the byte: 100000
>>> KB=byte/1000
>>> KB
100.0
>>> MB=byte/1000000
>>> MB
0.1
>>> GB=byte/1000000000
>>> GB
0.0001
>>> celcius=int(input("enter the calcius: "))
enter the calcius: 79
>>> fahrenheit=(9/5*celcius)+32
>>> fahrenheit
174.20000000000002
>>> fahrenheit=int(input("enter the fahrenheit: "))
enter the fahrenheit: 264
>>> celcius=5/9*(fahrenheit-32)
>>> celcius
128.8888888888888
>>> side=int(input("enter side: "))
enter side: 4
>>> area=side*side
>>> area
16
>>> perimeter=4*side
>>> perimeter
16
>>> l=int(input("enter length: "))
enter length: 5
>>> b=int(input("breadth: "))
breadth: 8
>>> area=l*b
>>> area
40
>>> perimeter=2*(l+b)
>>> perimeter
26
>>> R=int(input("enter Radius: "))
enter Radius: 8
>>> area=22/7*R*R
>>> area
201.14285714285714
>>> b=int(input("enter base: "))
enter base: 2
>>> h=int(input("enter height: "))
enter height: 5
>>> area=(b*h)/2
>>> area
5.0
>>> GrossSalay=int(input("enter gross Salay: "))
enter gross Salay: 30000
>>> allowance=GrossSalay*0.10
>>> deduction=GrossSalay*0.03
>>> NatSalay=GrossSalay+allowance-deduction
>>> NatSalay
32100.0
>>> GrossSalay=int(input("enter gross Salay: "))
enter gross Salay: 50000
>>> discount=GrossSalay*0.10
>>> NatSalay=GrossSalay-discount
>>> NatSalay
45000.0
>>> subjects1=int(input("enter subjects1 marks:"))
enter subjects1 marks:89
>>> subjects2=int(input("enter subjects2 marks:"))
enter subjects2 marks:70
>>> subjects3=int(input("enter subjects3 marks:"))
enter subjects3 marks:93
>>> total= subjects1+subjects2+subjects3
>>> total
252
>>> average=total/3
>>> average
84.0
>>>

You might also like