Python Shell Programming
Python Shell Programming
Python Shell Programming
Example:JavaCode:
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello, World!");
}
}
Example:
public class HelloWorld
{
public static void main (String[] args)
{
for(int i=1;i<=10;i++)
{
System.out.println("Hello, World!");
}
}
}
Example:
print("Hello, World!")
Example:
print("Hello, World"*10)
Comments in PYTHON:
Comments in Python are used to improve the readability of the code. Comments are
non executable statements or ignore statements. Using these comments we can declare
user defined or customized statements in the source code. Python supports two types
of comments.
1 Single lined comment.
2 Multi lined Comment.
Multi-line comments
If we have comments that extend multiple lines, one way of doing it is to use pound
(#) in the beginning of each line.
>>> #This is a long comment and it extends to multiple lines, This is a long
comment and it extends to multiple lines.
Example:
'''
Here we will check a given number n is even or odd
with multi-line comments in Python.
'''
Example:
1. Goto IDLE, Select File and click on New or Ctrl+N (to Open New Window)
2. Enter required python statements or commands
INSIDE PYTHON
After successful installation of Python, It is the combination of Interpreter and
Support Library.