Answer:
- common = []
- num1 = 8
- num2 = 24
- for i in range(1, num1 + 1):
- if(num1 % i == 0 and num2 % i == 0):
- common.append(i)
- print(common)
Explanation:
The solution is written in Python 3.
Firstly create a common list to hold a list of the common factor between 8 and 24 (Line 1).
Create two variables num1, and num2 and set 8 and 24 as their values, respectively (Line 3 - 4).
Create a for loop to traverse through the number from 1 to 8 and use modulus operator to check if num1 and num2 are divisible by current i value. If so the remainder of both num1%i and num2%i will be zero and the if block will run to append the current i value to common list (Line 6-8).
After the loop, print the common list and we shall get [1, 2, 4, 8]
Answer:random
Explanation:
A random method returns a number between zero and one.
Answer:
A = 120
B = 40
C = 70
Solution:
As per the question:
Manufacturer forced to make 10 more type C clamps than the total of A and b:
10 + A + B = C (1)
Also, 3 times as many type B as type A clamps are:
A = 3B (2)
The total no. of clamps produced per day:
A + B + C = 330 (3)
The no. of each type manufactured per day:
Now, from eqn (1), and (3):
A + B + 10 + A + B = 330
2A + 2B = 320
A + B = 160 (4)
Now, from eqn (2) and (4):
3B + B = 160
B = 40
Since, A = 3B
A = 
A = 120
Put the values of A and C in eqn (3):
120 + 40 + C = 330
C = 70