Do you mean this?

sage: n = 1234567890123456789
sage: len(str(n))
19


On Sat, Sep 19, 2009 at 10:14 AM,  <calcp...@aol.com> wrote:
>
> Sorry, silly question:
>
> OK, I know I've done this in Sage before, but I can't remember for the
> life of me how.
>
> I'm writing a program that computes large integers and tests for
> primality.  What I'd like to do is print out the integer and how many
> digits it has.  I seem to remember having to convert the integer to a
> string and then find its length() or size().
>
> Could someone please remind me how this works?
>
> TIA,
> A. Jorge Garcia
> http://calcpage.tripod.com
>
> Teacher & Professor
> Applied Mathematics, Physics & Computer Science
> Baldwin Senior High School & Nassau Community College
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com
To unsubscribe from this group, send email to 
sage-edu+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to