First numbers
Write a program that receives numeric as A from the input andAll the first numbers smaller than aPrint in the output
Write a program that receives numeric as A from the input andAll the first numbers smaller than aPrint in the output
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 prime_number(number): if number<1: return false for num in range(1,number): if num % num==0 and num % 2 !=0: print(num) input_umber=int(input("inter number: ")) print(prime_number(input_umber))
aval=True num=int(input("please enter number: ")) num-=1 while num>1: div=num-1 aval=True while div>1: if num%div==0: aval=False break div-=1 if aval: print(num) num-=1
def prime(n): my_set = set() li = [] for i in range(2, n): if i in my_set: continue for j in range(i*2, n, i): my_set.add(j) li.append(i) return li num = int(input("enter num: ")) print(prime(num))
a = int(input("add: ")) x = 2 if a < 2: print ("avval nist") elif a == 2: print ("avval ast") else: while (x < (a//2)): if (a % x) == 0 : print("avval nist") break x = x + 1 else: print("avval ast" )
a = int(input("add: ")) j = 2 if a < 2: print ("avval nadarim") elif a == 2: print (a) else: while (j <= a): x = 2 while (x <= (j//2)): if (j % x) == 0 : j = j + 1 break x = x + 1 else: print(j) j = j + 1
# Prime Number Num = int(input("give me a number : ")) PrimeList = [1,2,3] for i in range(4,Num) : Count = 0 for j in range(2,i): Rem = int(i % j) if Rem != 0: Count += 1 else: break if Count == (i-2) : PrimeList.append(i) print(f"The prime number of smaller than {Num} are : {PrimeList}")
a = int(input("ye adad vared kon : ")) for i in range(2,a): for j in range(2,i): if i % j == 0: print(f"{i}❎ adade aval nist chon bar {j} bakhsh pazir ast") break else: print(f"{i}✅ adade aval ast")
Submitting answers is currently unavailable.
Write a function that receives a string and returns the number of letters: To solve this question, you should not use ready-made functions for example: get_len ('code-bezan.ir') # 13
Write a function to get 2 disciplines and search the second string in the first string. If there was the second string in the first string, TRUE and otherwise False returns: To search, you should not use ready -to -use functions ...
Build a table with HTML to show the following information: Name, Score, Hassan Hassani 17.25 Afforded Mohammadi Mohammed Hassani 13 Accept Mohammad Rezaei 9 Receives 19 Mardi Milad Mohammadi 12 ...
Write a program that receives the user's age from the input and checks that if the user was younger than 1, it would be a throw/raise error, otherwise print a welcome message
Write a function that receives the number of hours of employee work per month as a parameter and calculates the amount of employee salaries according to the formula below and returns each employee for 2 hours of work per month, per hour at 4 ...
Create a link with the following specifications. The phrase link (click here) should be on the code-bezan.ir page Title the phrase (programming exercise) be open but open on the new page
Write a program that receives a sentence and reversed each of the words and re -print the sentence without changing in the order of words. Input: Hello Amir ... Olleh Rima ...
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.