Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use haskell to write it 2pts) Generate a 2d matrix (list of tuples, two rows, each tuple being a column) of numbers that go from
use haskell to write it
2pts) Generate a 2d matrix (list of tuples, two rows, each tuple being a column) of numbers that go from 1 to 50 in the first row, and 51 to 100 in the second. It should look like this: (1,51), (2,52),(3,53), (4,54), (5,55), (6,56), (7,57),(8,58),(9,59), (10,60), (11,61), 12,62), (13,63), (14,64),(15,65), (16,66), (17,67), (18,68), (19,69), (20,70), (21,71), 22,72), (23,73), (24,74), (25,75), (26,76),(27,77), (28,78), (29,79), (30,80), (31,81), 32,82), (33,83), (34,84),(35,85), (36,86),(37,87), (38,88), (39,89), (40,90),(41,91), 42,92),(43,93),(44,94),(45,95),(46,96), (47,97),(48,98), (49,99), (50,100)] 2pts) Create a list like the previous one, but filter out all tuples that don't have 2 odd numbers (take more than one step if you need to) t should look like this: C1,51), (3,53), C5,55), (7,57),(9,59), (11,61), (13,63),C15,65), C17,67,1 9,69), C21,71), C23,73),(25,75), (27,77,(29,79), (31,81), (33,83), (35, 85), (37,87),(39,89) , (41,91),(43,93),(45,95),(47,97),(49,99 2pts) drop the first 10 elements from this list 1pt) get 10 factorial without defining a new function, and don't do 109876*5*4"3*21 2pts) Generate a 2d matrix (list of tuples, two rows, each tuple being a column) of numbers that go from 1 to 50 in the first row, and 51 to 100 in the second. It should look like this: (1,51), (2,52),(3,53), (4,54), (5,55), (6,56), (7,57),(8,58),(9,59), (10,60), (11,61), 12,62), (13,63), (14,64),(15,65), (16,66), (17,67), (18,68), (19,69), (20,70), (21,71), 22,72), (23,73), (24,74), (25,75), (26,76),(27,77), (28,78), (29,79), (30,80), (31,81), 32,82), (33,83), (34,84),(35,85), (36,86),(37,87), (38,88), (39,89), (40,90),(41,91), 42,92),(43,93),(44,94),(45,95),(46,96), (47,97),(48,98), (49,99), (50,100)] 2pts) Create a list like the previous one, but filter out all tuples that don't have 2 odd numbers (take more than one step if you need to) t should look like this: C1,51), (3,53), C5,55), (7,57),(9,59), (11,61), (13,63),C15,65), C17,67,1 9,69), C21,71), C23,73),(25,75), (27,77,(29,79), (31,81), (33,83), (35, 85), (37,87),(39,89) , (41,91),(43,93),(45,95),(47,97),(49,99 2pts) drop the first 10 elements from this list 1pt) get 10 factorial without defining a new function, and don't do 109876*5*4"3*21Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started