Computer Science, asked by seventhb3166, 1 month ago

Write a program in python to display the square of an element if it is an integer and

change the case if the element is a string. List contains both integers and strings.

If the List L is : [10, “FUN”, 40, “FEW”, 50, “FULL”]

The final list should be: [100, “fun”, 1600, “few”, 2500, “full”]​

Answers

Answered by adnan0345
1

Answer:

Nothing we can pyton is easy

Answered by gopu22
6

\huge\sf\underline{\red{Answer}}

Here is your Program !

  1. def func ( input_list ) :
  2. if type ( i ) == 'int' : print ( i2 )
  3. if i.isupper ( ): print ( i.lower ( ) )
  4. else : print ( i.upper ( ) )
  5. else : print ( i ) input_list = input ( ) func ( input_list ) input_list = [ ]

\huge\sf\underline{\pink{Thanks}}

Similar questions