Thursday, December 31, 2015

Keyword: Print

If you learn Python, the first keyword (a keyword is a piece of code you use in programming)
you will ever learn is print. It is the simplest one too. All it means is display text on the screen, not printing words on a piece of paper. If you type in >>> print "Hello World!" in interactive mode (Interactive mode in python is like a python command prompt that allows you to tell it what to do. not actual programming) it will say Hello World! (by the way, it's a tradition in Python and other languages that the first thing you make the computer do is  >>> print "Hello World!". don't ask me why). you can also do something like this: >>> print 45 + 69
and it will say: 114. Don't be surprised, computers are good at math. 


No comments:

Post a Comment