Answer:
num1 = int(input("Numerator: "))
num2 = int(input("Denominator: "))
if num1 < 1 or num2<1:
print("Input must be greater than 1")
else:
print("Quotient: "+str(num1//num2))
print("Remainder: "+str(num1%num2))
Explanation
The next two lines prompts the user for two numbers
<em>num1 = int(input("Numerator: "))</em>
<em>num2 = int(input("Denominator: "))</em>
The following if statement checks if one or both of the inputs is not positive
<em>if num1 < 1 or num2<1:</em>
<em> print("Input must be greater than 1")-> If yes, the print statement is executed</em>
If otherwise, the quotient and remainder is printed
<em>else:</em>
<em> print("Quotient: "+str(num1//num2))</em>
<em> print("Remainder: "+str(num1%num2))</em>
<em />
Answer:
On your desktop, hover over the message you'd like to share and click the Share message icon on the right. Use the drop-down menu to choose where you'd like to share the message, and add a note if you'd like. Click Share to see the message expand.
Explanation:
Answer:
% here x and y is given which we can take as
x = 2:2:10;
y = 2:2:10;
% creating a matrix of the points
point_matrix = [x;y];
% center point of rotation which is 2,2 here
x_center_pt = x(2);
y_center_pt = y(2);
% creating a matrix of the center point
center_matrix = repmat([x_center_pt; y_center_pt], 1, length(x));
% rotation matrix with rotation degree which is 45 degree
rot_degree = pi/4;
Rotate_matrix = [cos(rot_degree) -sin(rot_degree); sin(rot_degree) cos(rot_degree)];
% shifting points for the center of rotation to be at the origin
new_matrix = point_matrix - center_matrix;
% appling rotation
new_matrix1 = Rotate_matrix*new_matrix;
Explanation:
We start the program by taking vector of the point given to us and create a matrix by adding a scaler to each units with repmat at te center point which is (2,2). Then we find the rotation matrix by taking the roatational degree which is 45 given to us. After that we shift the points to the origin and then apply rotation ans store it in a new matrix called new_matrix1.
The answer is backlighting