please use python
function should do the following:
when the function input is ([[11, 11, 11, 11, 11], [1, 5, 5, 5, 7], [255, 255, 255, 0, 255]])
the output should be [['11x5'], ['1x1', '5x3', '7x1'], ['255x3', '0x1', 255x1']]
functions/methods (please DO NOT use functions that are not specified here):sum() min() max() list append() list insert() list remove() list pop() list count() list index() list sort() str capitalize() str isupper() str strip() str split() str join() id() len() str lower() str upper() str replace() str count() str find()
Step by stepSolved in 3 steps with 2 images
Thank you! Just a follow up question, how would you do it the other way around? Where ['11x5'] becomes [11, 11, 11, 11, 11] etc.
Thank you! Just a follow up question, how would you do it the other way around? Where ['11x5'] becomes [11, 11, 11, 11, 11] etc.
- Write a user-defined function in python that will accept five(5) numbers and calculate the sum, average, and product of those numbers that are less than or equal to 50 and greater than or equal to 25.arrow_forwardyou will develop a c++ program to sort the elements of a character array in descending order. Your program should ask the user to input 7 elements (of type char) for the array and sort it. For instance, if the user enters d a b e c x g, your program should display: x g e d c b a Note: You cannot use the built-in sort function. Also, you can assume that the user only enters lower-case characters.arrow_forwardusing c++ with comments pleasearrow_forward
- write this in c++ format function sequence(n){ var n = 10; // this is just for explanation you can take any value from user input var arr = [n]; //this is to store result //Continue to generate numbers in this way until N becomes equal to 1 while(n > 1){ //check if even if(n % 2 == 0){ //If N is an even number, then divide N by two to get a new value for N n = n / 2; } else{ //If N is an odd number, then multiply N by 3 and add 1 to get a new value for N. n = (n * 3) + 1; } arr.push(n); } Logger.log("sequesnce: "+ arr) Logger.log("Number of terms: "+arr.length);}arrow_forwardIn C++arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education