Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Veronica Davis
6,468 PointsOOP Game - is there a way to pause text between combat rounds?
I'd like to make the game pause for a second or 2 at the end of each combat round so that the player can read the results before the next round starts. Is there a way to make the output pause for a time interval, or is my best bet something along the lines of a method that pulls in input("[C]ontinue" )?
3 Answers
Jeremy Hayden
1,740 PointsYour question is tagged python, so here is a python answer I found.
import time print("something") time.sleep(5.5) # pause 5.5 seconds print("something")
David Bouchare
9,224 Points+1 with what Jeremy said above.
sleep() will accept a time with a nonzero fraction, so in your case, if it is just a second or two you could just put:
time.sleep(2)
Veronica Davis
6,468 PointsThanks!