Giter VIP home page Giter VIP logo

prime-number-determination's Introduction

Prime-number-determination

python

"Read a positive number as input in this program and determine whether it is a prime number or not. Definition of a prime number: A number that is not divisible by any other number except 1 and itself. For example, 7 is a prime number because it is only divisible by 1 and 7. The number 6 is not prime because it is divisible by 2 and 3 in addition to 1 and 6.

If the number is prime, print "prime" in the output, and if it is not prime, print "not prime" in the output. Please note that the output should be exactly as stated. It is important to have lowercase letters.

Sample Input: 25

Sample Output: not prime"


در این برنامه یک عدد مثبت از ورودی بخوانید و تعیین کنید آیا این عدد اول است یا خیر. تعریف عدد اول‌: به غیر از یک و خودش به هیچ عدد دیگری بخشپذیر نباشد. مثلا ۷ عدد اول است چون فقط به یک و ۷ بخشپذیر است. عدد ۶ اول نیست چون به غیر از ۱ و ۶ به ۲ و به ۳ نیز بخشپذیر است.

درصورتی که عدد اول بود در خروجی عبارت prime را چاپ کنید و در صورتی که عدد اول نبود در خروجی عبارت not prime را چاپ کنید. لطفا دقت کنید که خروجی دقیقا طبق آنچه گفته شده است باشد. کوچک بودن حروف مهم است.

ورودی نمونه:

25

خروجی نمونه:

not prime

prime-number-determination's People

Contributors

sdaryan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.