<jupyter_start><jupyter_text>lambda exp,map,filter<jupyter_code>def cube(num):
    return num**3
cube(2)
my_num=[1,2,3,4,5,6,7,8,9,10]<jupyter_output><empty_output><jupyter_text>my problem is - i want to pass each and every individual item of the list of the list to the function as an argument and then store the result returned through the function in an list[]<jupyter_code>my_num_cubes = []
for i in my_num:
    my_num_cubes.append(cube(i))
my_num_cubes
my_num_cubes = list(map (cube,my_num))
my_num_cubes<jupyter_output><empty_output><jupyter_text>filter<jupyter_code>def check_even(num) :
    return num%2==0
check_even(4)
my_num<jupyter_output><empty_output><jupyter_text>my problem is i want to filter out all the ojects which are satisfying the particular case in the function and the given functio and if the result is true add that object into the new_list<jupyter_code>my_even_num = []
for i in my_num:
    if(check_even(i)):
        my_even_num.append(i)
my_even_num
my_new_even_num = list(filter(check_even,my_num))
my_new_even_num<jupyter_output><empty_output><jupyter_text>lambda functions<jupyter_code>def square(num):
    result = num**2
    return result
square(2)
def square(num):
    return num**2
square(4)
def square (num) : return num**2
square(8)<jupyter_output><empty_output><jupyter_text>my problem is ....... for small scale functions in which i want to run a line exp. that to by keepimg in mind the design scense of the overalll program and minimizing the number of lines of codes and even for defining rapidly in a string line in ad-hoc situations<jupyter_code>squ = lambda num : num**2
squ(6)
def check_odd(num):
    result = not num%2==0
    return result
check_odd_new = lambda num : not num%2==0
check_odd_new(4)
check_odd_new(9)
my_new_odd_num = list(filter(lambda num : not num%2==0,my_num))
my_new_odd_num<jupyter_output><empty_output><jupyter_text>you are a director of a college,you want to reward all the students who got more than 85 marks in final exams, for ordering out the number of awards you need a final count , make a small python script in which you can use lambda exp, &filter method to get the count of studentsgiven list of marks = 45,67,89,56,98,82,32,74,68,59,90,73<jupyter_code>my_marks = [45,67,89,56,98,82,32,74,68,59,90,73]

result_final = list(filter(lambda output : output >85,my_marks))
result_final<jupyter_output><empty_output><jupyter_text>you are a director of a college,you want to grade student based out of their marks in the exam in a,b,c,d,e,fail solve the problem using map in python90>= a <=10080>= b <=8970>= c <=7960>= d <=6950>= e <=590>= fail <=49given list of marks = 45,67,89,56,98,82,32,74,68,59,90,73<jupyter_code>marks = 45,67,89,56,98,82,32,74,68,59,90,73
def grades(num):
    if num >90:
        return 'a'
    elif num>80:
        return 'b'
    elif num>70:
        return 'c'
    elif num>60:
        return 'd'
    elif num>50:
        return 'e'
    elif num>0:
        return 'fail'
my_grades_list = list(map(grades,marks))
my_grades_list<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10460934946060804, 'fraction_numerical': 0.05459300424975482, 'mean_word_length': 5.309278350515464, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '248168', 'license': 'MIT', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1101, 'n_words': 330, 'path': 'functions1.ipynb', 'repo_name': 'jayaramoruganti777/functions1', 'size': '3059'}