Question: Define a Python function called leng_of_str to calculate the length of a string (Hint: Use the len function to find the length of string). 2)
Define a Python function called leng_of_str to calculate the length of a string (Hint: Use the len function to find the length of string). 2) [5 pts] Define a Python function called area_circle to calculate the area of a circle, where radius of a circle is given by the user. (Hint: 2 Area r where can be imported from math library. from math import pi) 3) [5 pts] Define a Python function called SQUAREPROD returns the square of the product of the parameters. For example 2 2 SQUAREPROD 2, 5 2 5 100 . 4) [10 pts] Define a Python function called Updated_List which takes a list and returns a new list with unique elements of the first list. For example if the list is [2,3,5,5,5,6,6,11,33,33,33], the output is [2,3,5,6,11,33]. 5) [15 pts] Write a function called reverse that accepts a nonnegative integer argument n and returns the integer that has the reverse decimal representation. For example, the reverse of 12 is 21, and the reverse of both 21 and 210 is 12. 6) [15 pts] Define a Python program called Inverse_Sum to calculate the sum of 1 numbers based on the definition below: YOU HAVET TO USE RECURSION CONCEPT. For example, for given 2, Inverse_Sum(n)=1 + 1 2 + 1 3 + + 1 1 and if = 1, Inverse_Sum(n)=1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
