Using "Print" statement in Python (Basic Guide).
Monday, October 10, 2016
Add Comment
Using "Print" statement in Python (Basic Guide).
Python Print Function. This is a simple guide using a print statement, although the print statement in python looks very simple. but many people are still confused about using this statement. Especially for a beginner python user. The print statement is a basic command in python programming. The print statement will print any data type, but most often a string data type. But any data type is possible to print. Now, follow this guide below to use "print" statement in python.
Make sure python installed correctly on your computer, you can directly python from the link below.
https://www.python.org/downloads/release/python-2712/
Writing Python Programming.
- Open the text editor, for this case, we can use notepad from windows.
- Now type this simple program list below.
- Explanation ;
- The String data to be displayed must be enclosed in double quotes (".....")
- Numeric data types can be directly written without the quotes
- \t used for Tab
- \n used for a new line
print "hello world"
print "try to use script mode"
print "Name\t\t: Andy Law\nAddress\t\t: 15604 Alexander Rd"
print 2016
- Filename: hello.py
- Save as type: All files
0 Response to "Using "Print" statement in Python (Basic Guide)."
Post a Comment