×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Pune, india
    Posts
    186

    Question how to find a number is even or not , with python.

    hi

    how to test that a number is even or odd?

    plz tell the function and library to be imported.

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: how to find a number is even or not , with python.

    Hi Sagar,

    This is not a PyS60 focussed question, its more into core Python.

    You can make your own fuction easily which can check if a given number is even or odd.
    Code:
    def check(number):
        if number%2==0:
            print "Even Number"
        else:
            print "Odd Number"
    Hope that helps,

    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Pune, india
    Posts
    186

    Re: how to find a number is even or not , with python.

    Quote Originally Posted by croozeus View Post
    Hi Sagar,

    This is not a PyS60 focussed question, its more into core Python.

    You can make your own fuction easily which can check if a given number is even or odd.
    Code:
    def check(number):
        if number%2==0:
            print "Even Number"
        else:
            print "Odd Number"
    Hope that helps,

    Best Regards,
    Croozeus
    hi croozeus,
    ok it worked...
    very much thnks again....

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: how to find a number is even or not , with python.

    A question has been moved to http://www.developer.nokia.com/Commu...-from-a-string, this redirection will be removed after a couple days.

Similar Threads

  1. is it passible to find out phone number by using IMSI number
    By Bhoopathi Kummara in forum Symbian
    Replies: 3
    Last Post: 2008-08-05, 17:05
  2. Find out the Phone Number from inside J2ME
    By sergiutruta in forum Mobile Java General
    Replies: 5
    Last Post: 2008-03-24, 00:49
  3. How to find number of my Emulator?????????
    By giridharn in forum Symbian
    Replies: 3
    Last Post: 2005-04-05, 11:33
  4. list box example
    By murmur20 in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-11-09, 04:42
  5. Unicode Song Title In NSM Ringtone
    By mcai7db3 in forum Smart Messaging
    Replies: 3
    Last Post: 2002-08-28, 06:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×