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
#4
Thanks for the quick response buran, I was playing with perfect numbers, trying to reverse engineer them. lol
The problem is python cannot handle 100 mb outputs to well when calculating.

yet this one is easy

# Mersenne Prime Hunter
i = 496
result = 1
while i >= 2 :
    print(f'{result: <3}) {i}')
    i //= 2
    result += 1
print (result/2 +.5)
Reply


Messages In This Thread
RE: Print Numbers starting at 1 vertically with separator for output numbers - by Pleiades - May-09-2019, 12:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  coma separator is printed on a new line for some reason tester_V 4 417 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,435 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,426 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,770 Dec-17-2022, 02:41 PM
Last Post: cametan_001
  List of random numbers astral_travel 17 2,530 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