The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
FrEaK (1) [Avatar] Offline
Here is how I solved this problem without a nested loop! Just be sure to tab the for loop block code!

import time

cdtime = int(raw_input("How many seconds? "))
stars = cdtime

for i in range (cdtime, 0, -1):

print i, (stars * "*")
stars = stars - 1

print "Blast off!"
warren.sande (211) [Avatar] Offline
Re: Chap. 11 Prob. 2 Different Soloution
Good One! You used the same trick we showed in Chapter 1:

print "hello" * 20

Nice to see you remembered that and made the connection to this problem.

Warren Sande