Classic Prime Number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Classic Prime Number

Hi I want to make a program which says the given number it is prime or not prime with dividing x to numbers x-1 to 2 (for not dividing to itself and 1)(including 2) if there is one and more answers that x/ x-1 equals math.floor(x/ x-1) it is not a prime number.

4th Jan 2020, 8:27 PM
Rasim Özcan Öz
Rasim Özcan Öz - avatar
3 Answers
+ 1
okay! great! then go and write the code. and if you have any question about your code or if you get stuck, then post the code with a question on this forum. good luck!
4th Jan 2020, 8:40 PM
Brave Tea
Brave Tea - avatar
4th Jan 2020, 9:08 PM
Rasim Özcan Öz
Rasim Özcan Öz - avatar
0
This is the part I have done but I dont know how to get any further
4th Jan 2020, 9:09 PM
Rasim Özcan Öz
Rasim Özcan Öz - avatar