Question: Question 3 (1 points) Create a Pyth function that ac temperature, a forex Create a function and correct_temp with companitarymt naud degres; and auther keyword


Question 3 (1 points) Create a Pyth function that ac temperature, a forex Create a function and correct_temp with companitarymt naud degres; and auther keyword argument and cax_type with a default value of stoc Imide your sa functie, you will red to conck fix that type of variable lingue is your penital arytme degrees - If the viable type is an ist ara flost, you will prooed with the required dagens ce the urinble typer is not an staflot, your function will be the return statement to provide of -2 to the faction call and will not do any further HINT: Let's say that you have a Pythe variable named z. To check if this variable is an lat type you can either instances, int) a type(s) - int. Similarly, you can sistancals, float) ce type(x) -- float to check if x is a float type Laskip the Python built-in Saintance() function. . Altering that the variable type of your practical argument name degree is either into flost, your new functie will come thrinprat degrees (your function patial area to Cebewing the correct la provided in the above) when the positional games cav_type is proud the value to. The converted dyrels pour formula) will the function return statement to provide its crted wala to the function caller and will not do any further Aering that the variable type of your practical argument name degree is either into flost, your are fansceties will court the input (= your fansetia paatinal t) ta Faitheerthait wing the core formal powded in this article) when the positional gamme_type ispod the value'ctor. The comited deg (bre y formula) will the function return statement to provide its vested to the function aller and will not do my further . Es all of your convenio vale are rounded up to 1 decimal for both optic ("toc' and 'cted"). If you pe a pitial argument with all other than toe' or 'stop', your function will be the return statement to provide a value of -1 to the functie caller and will not do any further CV. Correct Check If you were to run the following functie cul, you crat prut shed he was follows: >> - Carrer_tep(100) >>>print(x) >>> - convert_tap(100, cav_type") >>>> - Corettes'100', '') >>> - cart_ep31. ) >> - Carrert tep(3. 'L') Question 4 (1 points) Write a function that compx a string and etwa dietary with each unique character in the string arkey and its corresponding member of cavalta. As a reme, Quant 5 from Guided med Create a functies and get_char_count_dict with positional matutat. Imide your sa functire, you will saved to check fix ther types of variable being pwed in your penital altat - the variable type is a string, you will proceed with the function. -If the variable type beat a string your function will be the return statement to provide a value -1 to the fiction caller and will not pond any furth. - HINT: Let's way that you have a Python variable named z. To chand if the variable is a string, you come intances, str) or type(s) - str. Clackout: https://pythonprinciples com/blog/checklatring . After curing that the variabile type of your positional argument m. txt is a string your w functies will find change any perco durante in tutto coming the string over thed, that the functie motive Alle catering everything in txt to low, creempty dictionary that will store your wal. The tea for loop to itsate all curate in txt w follow - character in mustalary in your dictionary, create a new key-val entry in your dictionary with ther character a key and it malam - a caracter is already a key in your dictionary, it is exciting value by 1. - HINT: Let's way you have a Pythe dictionary tumand D. Yos can check if this dictionary Dhawa lory russend kwyl by the following temat: kyl in D Do not want whitepec (whitespace chamtar i Python is simply"). - Whath for loop finishes, your diction should be each character (no lary) and its comprad ing number of citat ( wala) Use the functie return statement to provide the newly constructed dictionary of character cants of the input tst to the functies called your function will not proceed any further Correct Checks If you were to run the following functies call your ratpratereld be as follow: >> D-get_char_count_dict("little') >>>print() (1:2, 1:1, "t": 2, 1) >> D-get_char_count_dict("Little') >>print() (1:2, 1:1, "t": 2, 1) >> D-get_char_cont dict(127) >>> prit() >>al - 'The mly imposible says the one you ever begin! >> D-get_char_count_dict (21) (2, 'h": 2, 3, 5, 'a': 5. '1': 2, 'y's 3, 1:4. '': 1, "p": 1, ": 3. 'b's 2, '': 1, ": 2, "I": 2, "v": 1, "g': 1, 1:1) >> D-get_char_count_dict() >>> prit() 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
