hi
how to test that a number is even or odd?
plz tell the function and library to be imported.
Printable View
hi
how to test that a number is even or odd?
plz tell the function and library to be imported.
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"[/CODE]
Hope that helps,
Best Regards,
Croozeus
[QUOTE=croozeus;459677]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"[/CODE]
Hope that helps,
Best Regards,
Croozeus[/QUOTE]
hi croozeus,
ok it worked...
very much thnks again....
A question has been moved to [url]http://www.developer.nokia.com/Community/Discussion/showthread.php?239345-How-to-extract-numbers-from-a-string[/url], this redirection will be removed after a couple days.