×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    12

    Round Number (How to?)

    Simple question, but Iafter searching, I haven't found a solution. How do you round a number in PyS60? In GPS the horizontal accuracy is displayed as ex: 100.2947556 I really only need the "100" to the left pf the "."

    I have tried things like: round(acc)

    Towards the end of this thread, there is the use of "round" but I tried and it didn't work for me. I also tried "split" but that didn't work either ...any suggestions? Am I doing something wrong??

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Round Number (How to?)

    All you have to do is convert it to integer using the int function:
    Code:
    >>> int(100.2947556)
    100

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    12

    Re: Round Number (How to?)

    Thanks :-)

    Quote Originally Posted by bogdan.galiceanu View Post
    All you have to do is convert it to integer using the int function:
    Code:
    >>> int(100.2947556)
    100

Similar Threads

  1. Preverification failed (result=1) in build.xml
    By caradine in forum Mobile Java General
    Replies: 12
    Last Post: 2009-08-06, 07:41
  2. SIM SMS SC number - some device can not change SIM SC number
    By ashiqur in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2009-05-18, 14:57
  3. SIM SMS SC number - E-71 can not modify SIM SC number
    By ashiqur in forum General Development Questions
    Replies: 1
    Last Post: 2009-05-14, 15:04
  4. Dialing Different number all together!!!
    By priteshgajjar in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2009-05-12, 06:04
  5. WML & WMLSCript problem ????
    By gemini_shooter in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-14, 06:01

Posting Permissions

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