Answer:
import numpy as np
a = int(input ("Enter a"))
b = int(input ("Enter b"))
c = int(input ("Enter c"))
d = int(input ("Enter d"))
c1 = int(input ("Enter c1"))
c2 = int(input ("Enter c2"))
array1 =[[a, b],[c, d]]
A = np.array (array1)
B = np.array ([c1, c2])
X = np.linalg.inv (A).dot (B)
print (X)
Explanation:
let ax + by =c1
cx + dy =c2
We have used the above NumPy library that has the methods for matrix calculation, and here we have used matrix multiplication, and the inverse of a matrix to find the value of x and y.
We know AX=B
X = inv A. B
And this we have used above. We can calculate inv A and do matrix multiplication using NumPy. And thus we get the above solution.
Answer:
def first_a(n):
lst1 =[x for x in range(1,n+1)if x%6==0 or x%11 ==0]
print(lst1)
Explanation:
Above is a function in python programming language. We have used list comprehension to check numbers that are multiples of 6 or 11 in a range.
When this function is called it will receive an argument (n) of type integer, a range will then be generated from 1 to n+1 since n is inclusive. The modulo operator is used to determine is a value is a multiple of 6 or 11, since their multiples will evaluate to 0
Answer:
DDos or Distributed Denial Of Service Attack
Explanation:
:)