Answer:
Codes for each of the problems are explained below
Explanation:
PROBLEM 1 IN C++:
#include<iostream>
using namespace std;
//fib function that calculate nth integer of the fibonacci sequence.
void fib(int n){
// l and r inital fibonacci values for n=1 and n=2;
int l=1,r=1,c;
//if n==1 or n==2 then print 1.
if(n==1 || n==2){
cout << 1;
return;
}
//for loop runs n-2 times and calculates nth integer of fibonacci sequence.
for(int i=0;i<n-2;i++){
c=l+r;
l=r;
r=c;
cout << "(" << i << "," << c << ") ";
}
//prints nth integer of the fibonacci sequence stored in c.
cout << "\n" << c;
}
int main(){
int n; //declared variable n
cin >> n; //inputs n to find nth integer of the fibonacci sequence.
fib(n);//calls function fib to calculate and print fibonacci number.
}
PROBLEM 2 IN PYTHON:
def fib(n):
print("fib({})".format(n), end=' ')
if n <= 1:
return n
else:
return fib(n - 1) + fib(n - 2)
if __name__ == '__main__':
n = int(input())
result = fib(n)
print()
print(result)
Answer:
(a) the velocity ratio of the machine (V.R) = 1
(b) The mechanical advantage of the machine (M.A) = 0.833
(c) The efficiency of the machine (E) = 83.3 %
Explanation:
Given;
load lifted by the pulley, L = 400 N
effort applied in lifting the, E = 480 N
distance moved by the effort, d = 5 m
(a) the velocity ratio of the machine (V.R);
since the effort applied moved downwards through a distance of d, the load will also move upwards through an equal distance 'd'.
V.R = distance moved by effort / distance moved by the load
V.R = 5/5 = 1
(b) The mechanical advantage of the machine (M.A);
M.A = L/E
M.A = 400 / 480
M.A = 0.833
(c) The efficiency of the machine (E);

Answer:
A)The sketches for the required planes were drawn in the first attachment.
B)The sketches for the required directions were drawn in the second attachment.
To draw a plane in a simple cubic lattice, you have to follow these instructions:
1- the cube has 3 main directions called "a", "b" and "c" (as shown in the first attachment)
2- The coordinates of that plane are written as: π:(1/a₀ 1/b₀ 1/c₀) (if one of the coordinates is 0, for example (1 1 0), c₀ is ∞, therefore that plane never cross the direction c).
3- Identify the points a₀, b₀, and c₀ at the plane that crosses this main directions and point them in the cubic cell.
4- Join the points.
To draw a direction in a simple cubic lattice, you have to follow these instructions:
1- Identify the points a₀, b₀, and c₀ in the cubic cell.
2- Draw the direction as a vector-like (a₀ b₀ c₀).