Answer:
Microsoft Word can dohjr iiejdnff jfujd and
Answer:
// program in python
# import math library
import math
#read input from user
num=int(input("enter an integer:"))
while True:
#find square root on input
s_root=math.sqrt(num)
#find remainder of root
r=s_root%1
#if remainder if 0 then perfect square
if r==0:
print("square root of the number is:",s_root)
break
else:
#if number is not perfect square then ask again
num=int(input("input is not perfect square !!enter an integer again:"))
Explanation:
Read an integer from user.Find the square root of the input number and then find the remainder of square root by modulo 1.If the remainder is 0 then number is perfect square otherwise ask user to enter an integer again until user enter a perfect square number.
Output:
enter an integer:12
input is not perfect square !!enter an integer again:16
square root of the number is: 4.0
Answer:
For n = 100
For n = 200
For n = 400
For n = 800
The faster approach is A(Bx)
Explanation step by step functions:
A(Bx) is faster because requires fewer interactions to find a result: for (AB)x you have (n*n)+n interactions while for A(Bx) you have n+n, to understand why please see the step by step:
a) Function for (AB)x:
function loopcount1 = FirstAB(A,B,x)
n = size(A)(1);
AB = zeros(n,n);
ABx = zeros(n,1);
loopcount1 = 0;
for i = 1:n
for j = 1:n
AB(i,j) = A(i,:)*B(:,j);
loopcount1 += 1;
end
end
for k = 1:n
ABx(k) = AB(k,:)*x;
loopcount1 += 1;
end
end
b) Function for A(Bx):
function loopcount2 = FirstBx(A,B,x)
n = size(A)(1);
Bx = zeros(n,1);
ABx = zeros(n,1);
loopcount2 = 0;
for i = 1:n
Bx(i) = B(i,:)*x;
loopcount2 += 1;
end
for j = 1:n
ABx(j) = A(j,:)*Bx;
loopcount2 += 1;
end
end
B. Bend and Break Is the correct answer
As you may know people learn in different ways. Some learn by audio, hands on, and simply just reading. When he says textspeak it more than likely means the text will be read to you in a way you would understand better.