Page 109 - Gujrati Play V2.0 Class 6 Flipbook
P. 109
fux÷kf ðÄw «kuøkúk{ku
«kuøkúk{ 5: ðÃkhkþfíkko îkhk Ëk¾÷ fhkÞu÷k çku Lktçkhku çkkË fhðk
Program5.py
File Edit Format Run Options Window Help
a = int(input('Enter the first number: '))
b = int(input('Enter the second number: '))
sub = a - b
print('Difference of two numbers is:', sub)
WÃkhkuõík «kuøkúk{Lkwt Ãkrhýk{ Au:
Output
Enter the first number: 20
Enter the second number: 8
Difference of two numbers is: 12
«kuøkúk{ 6: ºký rð»kÞkuLkk Mkhuhkþ økwýLke økýíkhe fhðe
Program6.py
File Edit Format Run Options Window Help
sub1 = int(input('Enter marks of the first subject: '))
sub2 = int(input('Enter marks of the second subject: '))
sub3 = int(input('Enter marks of the third subject: '))
avg = (sub1 + sub2 + sub3)/3
print('Average of marks is: ', avg)
WÃkhkuõík «kuøkúk{Lkwt Ãkrhýk{ Au:
Output
Enter marks of the first subject: 95
Enter marks of the second subject: 96
Enter marks of the third subject: 94
Average of marks is: 95.0
«kuøkúk{ 7: rMkr÷LzhLkk MkkRÍ yLku MkÃkkxeLkk ûkuºkV¤Lke økýíkhe fhðe
Program7.py
File Edit Format Run Options Window Help
pi = 22/7
height = float(input('Enter the height of cylinder: '))
radius = float(input('Enter the redius of cylinder: '))
volume = pi * radius * radius * height
surface_area - ((2 * pi * radius) * height) + ((pi * radius ** 2) * 2)
print('The volume of the cylinder is:', volume)
print('Surface area is:', surface_area)
«kuøkúk®{øk ÃkkÞÚkLkLkku Ãkrh[Þ 107

