Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Printing googolplex
#1
Hi. I am trying to write a program that will print the number googol plex (1 followed by a googol(1 followed by 100 zeros)zeros). However, when I run the code the interface is blank. Here is my code:
number_googol="1"
number_googolplex="1"
r_t=0
r_t1=0
zero="0"

while (r_t<100):
    number_googol=number_googol + zero
    r_t=r_t+1
    

while (r_t1<int(number_googol)):
    number_googolplex=number_googolplex + zero
    r_t1=r_t1 +1

if (r_t1 == int(number_googol)):
    print(number_googolplex)
    
     
I encountered no errors trying to run the code.
Can anyone help?
Reply


Messages In This Thread
Printing googolplex - by ThePiMan - Apr-25-2018, 11:38 AM
RE: Printing googolplex - by mlieqo - Apr-25-2018, 12:21 PM
RE: Printing googolplex - by Gribouillis - Apr-25-2018, 04:50 PM

Forum Jump:

User Panel Messages

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