[Tutor] Trying to get this to work - attached is the source code

Alan Gauld alan.gauld at btinternet.com
Mon May 17 23:11:10 CEST 2010


"Peter" <cyclespoke at windstream.net> wrote

> Attached is the source code which accompanies the book and lessons. When
> I type it in I do not get the same result. I do not get the block
> lettering, or am I supposed to?

You need to use a monospaced font(like Courier).
If you use something like Arial or Times the spacing will be all messed
up and it won't look right.

Could that be the problem?


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


> Peter
> -------------------------------------------------------------------------------------------
>
> Hello,
>>  I am at the very beginning of learning Python. If anyone is familiar
>>  with Michael Dawson's book: "Python Programming for the Absolute
>>  Beginner" The following script (according to the book) should create
>>  "block lettering" created by dashes and vertical lines. If I could
>>  show a picture of it I would.
>
>
> ----------------------------------------------------------------------------------------------
>
> Below I have copied and pasted what appears after running the
> accompanied source code. When I type it manually, I cant get it to work.
>
> # Game Over - Version 2
> # Demonstrates the use of quotes in strings
>
> print("Program 'Peter Stein' 2.0")
>
> print("Same", "message", "as before")
>
> print("Just",
>       "a bit",
>       "smaller")
>
> print("Here", end=" ")
> print("it is...")
>
> print(
>         """
>          _____       ___       ___  ___   _____
>         /  ___|     /   |     /   |/   | |  ___|
>         | |        / /| |    / /|   /| | | |__
>         | |  _    / ___ |   / / |__/ | | |  __|
>         | |_| |  / /  | |  / /       | | | |___
>         \_____/ /_/   |_| /_/        |_| |_____|
>
>          _____   _     _   _____   _____
>         /  _  \ | |   / / |  ___| |  _  \
>         | | | | | |  / /  | |__   | |_| |
>         | | | | | | / /   |  __|  |  _  /
>         | |_| | | |/ /    | |___  | | \ \
>         \_____/ |___/     |_____| |_|  \_\
>
>         """
>      )
>
> input("\n\nPress the enter key to exit.")
>


--------------------------------------------------------------------------------


> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
> 




More information about the Tutor mailing list