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
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)
n=int(input ('your number: ')) x=0 for i in range(1,n): if n%i==0: x+=i if x==n : print ('kamel ast') else: print('kamel nist')
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} یک عدد کامل نیست.")
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")
number = int(input("adad bede bebinam kamele y na : ")) me = range(1,number) meh = [] for i in me: if number % i ==0: meh.append(i) x = 0 for m in meh: x +=m if x ==number: print(f"adade {number} kamele !") else: print(f"adade {number} kamel nist")
Submitting answers is currently unavailable.
Write a program that receives a number from the user and prints the multiplication table as the following in the output. Yek adad vared konid: 2 x 1 = 2 2 x 2 = 4 x 3 = 6 2 x 4 = 10 x 6 = 12 2 2 x 7 = 14 2 x 7 = 2
Write a program that receives a number and only by moving its figures, the smallest numbers can be found (with the same number of digits)
CSS code to select all the following elements at once and change their background color to yellow<div class="yellow" id="box"></div><div class="yellow"></div><div class="yellow mybox"></div>Footer call to action
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.