Output

Although Python is very flexible with output and can be used for GUI applications and web development the standard way of producing output is to the terminal window.  The command to output to the stdout is print.  

In this example we print some text, then maxScore and then we combine the two. Note how when combining strings with other data types we must convert the score to a string with the str command.

printStatement.png - 11/2015  

You can also list variables in the print statement and then you don’t have to convert them e.g.

 

About CDB 360 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.