Posts

Q6 rgeeeeeeeeeeeeeeeeeeeeeeeeeeeunlasfeuykanfyhawughnejnqwekluriryjqwkdjeydkqwreyfqwetguifyitfgquioygwetfgwe weqgbjdnkegyrjhmgykktw 3e444ee2jtyrbsvefsmse

    P.I.P:- 9.1   Q1. Suppose that D is the dictionary {"what" : 22, "are" : 11, "you" : 14, "doing" : 5, "next" : 9, "Saturday?" : 4} . Write down what the value of D is after each of the following Python statements. Evaluate each statement starting with the same value of the dictionary D, mentioned above and write what will be the change dictionary D?   (a) D ["what"] = D ["are"] (b) D.update ({"Sunday":25, "what":5}) (c) del D["you"] (d) D ["which"] = 19 (e) D.clear ()   Answer =   (a) >>> D = {"what" : 22, "are" : 11, "you" : 14, "doing" : 5, "next" : 9, "Saturday?" : 4} >>> D ["what"] = D ["are"] >>> D {'what': 11, 'are': 11, 'you': 14, 'doing': 5, 'next': 9, 'Saturday?': 4} ...

Q4

  P.I.P: - 3.2     Q8. Predict the output of following code:   num = 20.5 z = 3 result = 2 + z * z ** 3 + num // z print (result)   (a) Firstly, determine the answer without running the code and write. (b) Now type the above code in script mode and test-run the program. Write below the result given by Python.   Answer =   (i) It is based on your thinking that how you execute the above program in your mind. So do you self.   (ii) Output:-   89.0 >>>              Q9. Write a program to read a floating point number n. Print n, n 2 , n 3 , n 4 and n 5 .   Answer =   num = float (input ("Enter the number :- ")) print ("Answer is :- ", num, ', ', num **2, ', ', num ** 3, ', ', num ** 4, ' &', num ** 5)             Q10. Write a program that calculates the volume and surface area ...