Computer Science
Write a function that receives two string arguments and checks whether they are same-length strings (returns True in this case otherwise False).
Related Questions
Write a program to have following functions :
(i) a function that takes a number as argument and calculates cube for it. The function does not return a value. If there is no value passed to the function in function call, the function should calculate cube of 2.
(ii) a function that takes two char arguments and returns True if both the arguments are equal otherwise False.
Test both these functions by giving appropriate function call statements.
Write a function that receives two numbers and generates a random number from that range. Using this function, the main program should be able to print three numbers randomly.
Write a function namely nthRoot( ) that receives two parameters x and n and returns nth root of x i.e., x^(1/n).
The default value of n is 2.Write a function that takes a number n and then returns a randomly generated number having exactly n digits (not starting with zero) e.g., if n is 2 then function can randomly return a number 10-99 but 07, 02 etc. are not valid two digit numbers.