Answer:
// program in Python to check perfect number
#function to find number is perfect or not
def is_Perfect_Number(n):
#total variable
tot = 1
i = 2
#sum of all divisor of number
while i*i<=n:
if n%i==0:
tot = tot + i + n/i
if tot == n and n != 1:
return 1
i = i+1
return 0
#read until user enter a perfect number
while True:
#read integer
num = int(input("Input an integer: "))
#call the function
if(is_Perfect_Number(num)):
print(num,"is perfect number")
#if perfect number break
break
else:
print(num,"is not a perfect number")
#ask again
print("try again.")
Explanation:
Read number from user and then call the function is_Perfect_Number() with parameter "num".This will find the sum of all divisor of number.If sum is equal to number then it will return 1 else return 0.If the number is not perfect then it will again ask to enter a number until user enter a perfect number.
Output:
Input an integer: 24
24 is not a perfect number
try again.
Input an integer: 28
28 is perfect number
FutureSmart focuses on the important Middle School years by empowering students to become the stewards of their financial futures. This three hour web-based resource educates students on the practicalities of daily financial decisions and the payoffs of long-term planning. Since Middle School is an important period for positive habits
to take form and grow, this course is particularly meaningful.
Through a compelling narrative in which students play the Mayor of a town, local citizens are helped with real-life decisions. From weighing opportunity costs, to delaying instant gratification for long- term gain, students face important questions on their way to becoming FutureSmart. At the end of the course, students compose their own blueprint for the future. FutureSmart c
Answer:
The explanation of this question is given below in the explanation section. however, the correct option of this question is "Boot the machine into safe mode"
Explanation:
BSOD error on startup
Blue screen of death error arises mostly when dirver produce fault into system or did not install properly. however, the correct option for this question, if PC gets BSOD error on startup then it is the best option for technician to remove the hardware that is recently installed and/or try to boot the machine into safe mode, then uninstall the driver that causing error on startup.
BSOD error occur during running the program on PC
However, if PC get BSOD during running program, then the best option for technician is to restart the machine and then install the driver properly. During this operation, as error occured, you may loss the data becuase you have no other option to save the data of program that is running.
Answer:
Here the code is given as follows,
Explanation:
Code:-
#include <stdio.h>
int isSorted(int *array, int n) {
if (n <= 1) {
return 1;
} else {
return isSorted(array, n-1) && array[n-2] <= array[n-1];
}
}
int main() {
int arr1[] = {3, 6, 7, 7, 12}, size1 = 5;
int arr2[] = {3, 4, 9, 8}, size2 = 4;
printf("%d\n", isSorted(arr1, size1));
printf("%d\n", isSorted(arr2, size2));
return 0;
}
Output:-
Answer:
I don't know what the problem is for Charlie to solve so can you put it in the ch.at so I can answer it from there
Explanation: