A presenter selects multimedia materials primarily based on their ability to emphasize a point.
Answer:
def display_factors(num):
for counter in range(1, num+1):
if num % counter == 0:
print(counter)
int_num= int(input("Enter a number : "))
print("The factors for {} are : ".format(int_num))
display_factors(int_num)
Explanation:
The function display_factors is used to display all factors of a number entered by a user.
- In this for counter in range(1, num+1) the for loop is iterated until counter is greater to num is false. Counter variable starts from 1 and ends when it gets greater than the input number.
- if num % counter == 0: In this statement, each loop iteration, checks whether a number (num) is exactly divisible by counter. It is the condition for counter to be a factor of num.
- print(counter) This is used to display factors of an input number
- int_num= int(input("Enter a number : ")) This statement asks user to enter a number (int_num) which will be an integer.
- display_factors(int_num) This calls display_factors number to find the factors of an input number.
i would answer this with a stupid answer then ask you to answer my recent question :)
Answer:
3. Reads up to 3 values and places them in the array in the unused space.
Explanation:
cin.NextInt() reads the next value from the Scanner.
The while is just while the size is lesser than the capacity and the value is positive. It may read up to 3 values, and puts at the position size; Size starts at 3, that is, the first index which the value is 0, and goes up to 5. So it is the unused positions.
The correct answer is:
3. Reads up to 3 values and places them in the array in the unused space.