Slip 29 A)
Write a Python GUI program to calculate volume of Sphere by accepting radius as
input.
Answer :
pi = 3.1415926535897931
r= 6.0
V= 4.0/3.0*pi* r**3
print('The
volume of the sphere is: ',V)
Output :
Slip 29 B)
Write a Python script to sort (ascending and descending) a dictionary by key
and value.
Answer :
names = {1:'Sun' ,2:'Mon' ,4:'Wed' ,3:'Tue'
,6:'Fri' ,5:'Thur' }
#print a sorted list of the keys
print(sorted(names.keys()))
#print the sorted list with items.
print(sorted(names.items()))
Output :
Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 29 Answers
Reviewed by technical_saurabh
on
December 31, 2021
Rating:
1 comment:
I like this article, really explained everything in the detail, keep rocking like this. i understood the topic clearly, to learn more join Data Science Course
Post a Comment