Detect the full number
Write a program that receives a number from the user and determines whether the number is complete.
(Help: A complete numeral to the sum of the amount of the amount against his (except himself) equal to himself)
Write a program that receives a number from the user and determines whether the number is complete.
(Help: A complete numeral to the sum of the amount of the amount against his (except himself) equal to himself)
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
def Perfect_Number(number): total_number=0 if number<1: return False for num in range(1,number): if number % num ==0: total_number+=num return total_number==number number_input=int(input("inter number: ")) print(Perfect_Number(number_input))
num = input("Enter your number: ") print(True) if sum([i for i in range(1, int(num)) if int(num) % i == 0]) == int(num) else print(False)
try: num=int(input("number: ")) except: exit() i=num-1 mode_list=[] while i>0: if(num%i==0): mode_list.append(i) i-=1 sum=0 for item in mode_list: sum+=item if(sum==num): print("Kamel") else: print("Kamel Nist")
n=int(input('number:')) a=0 for i in range(1,n): if n%i==0: a=a+i else: pass print(a==n)
# The program that checks whether a complete number is def is_perfect_number(n): # Calculate the sum of the amount of the amount against the number (except the number itself) divisors_sum = sum(i for i in range(1, n) if n % i == 0) # Check whether the sum of the amount of the amount against the identity is equal to the number itself return divisors_sum == n # Get a number from the user number = int(input("یک عدد وارد کنید: ")) # Review and display the result if is_perfect_number(number): print(f"{number} یک عدد کامل است.") else: print(f"{number} یک عدد کامل نیست.")
number = int (input('enter : '))
for i in range(1 , number) :
if number % i == 0 :
print(number , 'complete')
break
elif number % number or 1 == 0 :
continue
else :
print(number , 'not complete')
break
while True : number = int(input("adad morede nazar ra vared konid : ")) r = list(range(1,number)) l = [] for x in r : if number % x == 0 : l.append(x) if sum(l) == number : print(l) break else : print("in adad kamel nist , lotfan adade digar vared konid")
Submitting answers is currently unavailable.
1- The system randomly selects a number between 1 and 100 2- The user tries to guess the selected number 3- After each user guess, if the number entered is correct, the program will end. Otherwise the schedule ...
Write a function that receives a text and returns the first 100 characters with "..." if the text is longer than 100 characters. Otherwise it will restore the whole text unchanged.
Write a program that receives 2 dates in yyyy/mm/dd format and print 2 dates to the output for example Tarikh1: 1401/11/01 tarikh2: 1401/11/05 4 days Tarikh1: 1401/10/01 Tarikh2: 1401/11/05 34 Days
Online Store with the following features to add new product by Admin in the Management Panel Panel User Name by User Selecting and Registering (Online Payment and Home Payment Option ...
Write a program that receives a number from the input and increases the number 2 and prints in the output. This trend continues until the number 0 is not arrived
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.