Python Forum
Print Numbers starting at 1 vertically with separator for output numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print Numbers starting at 1 vertically with separator for output numbers
#1
These numbers scroll vertically down my cmd screen after I hit execute from Geany. Is it possible for python to include numbers next to numbers with a separator, so I know which number to go to in the list? The imoge with the numbers below the sunglasses is what I hope for. Thanks anyone for the help.

Sad
262143
131071
65535
32767
16383

Cool
1)262143
2)131071
3)65535
4)32767
5)16383

Here is my code:

i = int(191561942608236107294793378084303638130997321548169216)
result = 0
while i >= 2 :
    print enumerate (i)
    i = i // 2
    
    result = result + 1
print (i //result)
print (result)
n = 191561942608236107294793378084303638130997321548169216//8
print (n)
Reply


Messages In This Thread
Print Numbers starting at 1 vertically with separator for output numbers - by Pleiades - May-09-2019, 08:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  coma separator is printed on a new line for some reason tester_V 4 418 Feb-02-2024, 06:06 PM
Last Post: tester_V
  How do I calculate a ratio from 2 numbers and return an equivalent list of about 1000 Pleiades 8 15,437 Jan-05-2024, 08:30 PM
Last Post: sgrey
  random numbers, randint janeik 2 526 Nov-27-2023, 05:17 PM
Last Post: janeik
  Advancing Page Numbers knight2000 4 933 May-24-2023, 09:14 AM
Last Post: knight2000
  Pulling Specifics Words/Numbers from String bigpapa 2 723 May-01-2023, 07:22 PM
Last Post: bigpapa
  How do I check if the first X characters of a string are numbers? FirstBornAlbratross 6 1,427 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  find random numbers that are = to the first 2 number of a list. Frankduc 23 3,012 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,033 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  prime numbers with iterator and generator cametan_001 8 1,771 Dec-17-2022, 02:41 PM
Last Post: cametan_001
  List of random numbers astral_travel 17 2,531 Dec-02-2022, 10:37 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020