HomeCHAPTER CLASS 12 Using Python Libraries || Type C || Sumita Arora || Class 12 || Computer science || Information practices || Solution 12 Comments Facebook Twitter Using Python Libraries || Type C || Sumita Arora || Class 12 || Computer science || Information practices || Solution || Q 1 = Write a Python program having following functions: (i) = A function with the following signature: Remove_letter (sentence, letter) This function should take a string and a letter (as a single-character string) as arguments returning a copy of that string with every instance of the indicated letter removed for example remove_letter ("Hello there!", "e") should return the string "Hllo thr!". Try implementing it using <str>.split ( ) function. (ii) =Write a function to do the following :Try implementing the capwords () functionality using other functions, i.e , split(), capitalize () and join( ). Compare the result with the capwords() function's result. Q 2 = Create a module lengthconversion.py that stores functions for various lengths conversion • miletokm () to convert miles to kilometers • kmtomile() to convert kilometers to miles • feettoinches( ) • inchestofeet() It should also store constant values such as value of (mile in kilometers and vice versa). [I mile = 1.609344 kilometer ; 1 feet = 12 inches] Help( ) function should display proper information. Q 3 = Create a module MassConversior.py that stores function for mass conversion e.g , • A kgtotonne( ) to convert kg to tonnes • A tonnetokg() to convert tonne to kg • A kgtopound( ) to convert kg to pound • A poundtokg()to convert pound to kg (Also store constants 1 kg - 0.001 tonne, 1 kg = 2.20462 pound) Help( ) function should give proper information about the module.Q 4 = Create a package from above two modules as this: Conversion Length Lengthconversion.py Mass Massconversion.pyMake sure that above package meets the requirements of being a Python package. Also, you should be able to import above package and/or its modules using import command.
plzz provide solutions for type b questions of this chapter
ReplyDeletePLEASE WAIT,IT WILL TAKE SOME TIME ......
DeleteBut it is there brother!
DeleteKeep up the good work!
ReplyDeleteThank you 😊😊
DeleteThank you so much 🥰❤️
ReplyDeleteThank you for your efforts , this website never fails to help me ....☺
ReplyDeleteMost Welcome : )
DeleteThanks a lot guruji for giving such helpful contents
ReplyDeleteWelcome : )
DeleteAlways Welcome : )
ReplyDeletehow many people work on this platform?
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )