[Tutor] Text problem
kent37 at tds.net
Wed Jun 8 20:03:48 CEST 2005
EUGENE ASTLEY wrote:
> I tried your suggestion but it does not work for me. I get a syntax
> error at use of the first question mark when trying it in Idle.
> When I try it from the desktop, it just flashes a black screen and
> returns me to the desktop.
> What is the question mark used for?
Somehow the text was garbled. In the quote below it shows question mark, quote, quote and quote, quote, question mark. In both places it should be quote, quote, quote - a triple-quoted string.
> def gameOver(self):
> text = ?""Your Score is %s
> Thank you for playing
> Please come again""? % Game.score_value
> games.Message(x = 400, y = 400, text = text,
> size = 60, color = color.green,
> lifetime = 1000, after_death = self.screen.quit())
More information about the Tutor