Lab Assignment#4
Lab Assignment#4
9. Matrix Representation
Represent a 3x3 matrix as a list of lists. Perform matrix addition and subtraction.
10. Prime Numbers in a Range
Write a program to generate a list of prime numbers between two user-specified
integers.
11. Even and Odd Segregation
Create a list of integers and separate it into two lists: one containing all even numbers
and the other containing all odd numbers.
12. Cumulative Sum
Write a program to create a list of cumulative sums from a given list. For example,
[1, 2, 3, 4] should output [1, 3, 6, 10].
13. List of Squares
Generate a list of squares of numbers from 1 to n, where n is user-defined.