Steps to Follow:
Use Python input() function to accept the list as an input from a user.
use for loop to iterate over a list
Do your operation in the body of for loop
Your code should be like this
Use Python input() function to accept the list as an input from a user.
use for loop to iterate over a list
Do your operation in the body of for loop
Your code should be like this
numbers = input("Enter a list element separated by space ") list = input_string.split() list = map(int, list) #first solution print(min(list)) print(max(list)) #second problem solution for i in list: if(i%2==0): print ("even number- ",i) else print ("odd number- ",i) #third problem solution sum = list[0] for i in list: print ("cumulative sum is - ",sum) sum+=i#4th solution try with yourself :)