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.
Answer:
a) Pick ONE OR MORE options Using code-splitting for JS files.
b) Compressing the JS files on the server-side
Explanation:
Javascript is a multi-purpose programming language, it is used in web development as a scripting language for programming the interactiveness of the web application.
Loading and running the script from the server can take a lot of time, so, the file is compressed and split for faster loading.
Answer: Ethics
Explanation:
Ethics is the basic principle for the personal code. The code of the ethics is basically designed for outline the values in the organization with honesty and integrity.
The ethics is basically depend upon the principle of core value of the organization. The code of the ethics basically guide the core value in the organization and breaking the rule of ethics can also cause termination from the organization.
Morality, integrity and honesty are all the sub part of the ethics vale in the organization. Therefore, ethics is the correct option.
Suppose an AI scientist designed a robot to ring an alarm for food. If the clock strikes 1, the robot displays a message “Time for lunch.” It displays such messages at breakfast and dinnertime, too. What kind of agent is the robot?
A. model-based reflex agent
B. goal-based agent
C. utility-based agent
D. simple reflex agent
Your answer is A, input device.