Sunday, April 10, 2016



1.  <script type="text/javascript">
2.  var ip = '';
3.  document.write('Your IP address is: ' + ip);
4.  </script>



Obtaining user input:
# Initialize a variable with a user-specified value.
user = input( ‘I am Python. What is your name? : ‘ )
# Output a string and a variable value.
print( ‘Welcome’ , user )

When multiple values are specified to the print() function it will display each value in output separated by a single space by default.
Output displayed by the print() function.
An alternative separator can, however, be specified by adding a sep parameter to the comma-separated list.

For example sep = ’*’ will display each value in output separated by an asterisk character.

By default print() function add an invisible \n newline
character at the end of the line to automatically move the print head to the next line.
An alternative line ending can, however, be specified by adding an end parameter to the comma-separated list.

For example, end = ’!’ will display each value in output then end the
line with an exclamation mark.

# Initialize another variable with a user-specified value.
lang = input( ‘Favorite programming language? : ‘ )
# Output a string and a variable value.
print( lang , ‘Is’ , ‘Fun’ , sep = ‘ * ‘ , end = ‘!\n’ )



Variable:
A “variable” is a container in which a data value can be stored within the
computer’s memory.
Declare a variable :
a = 8
Declare multiple variable :
a = b = c = 8
Declare multiple variable with different value :
a , b , c = 1 , 2 , 3
String data must be enclosed within quote marks (“ ” or ‘ ‘) to denote the start and end of the string.

Dreams are successions of images, ideas, emotions, and sensations that occur usually involuntarily in the mind during certain stages of slepping.

Dreams mainly occur in the rapid-eye movement (REM) stage of sleep—when brain activity is high and resembles that of being awake.

In modern times, dreams have been seen as a connection to the unconscious mind. They range from normal and ordinary to overly surreal and bizarre. Dreams can have varying natures, such as being frightening, exciting, magical, melancholic, adventurous, or sexual.

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.[23][24] Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java.[25][26] The language provides constructs intended to enable clear programs on both a small and large scale.[27]
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.[28]
Python interpreters are available for installation on many operating systems, allowing Python code execution on a wide variety of systems. Using third-party tools, such as Py2exe or Pyinstaller,[29] Python code can be packaged into stand-alone executable programs for some of the most popular operating systems, allowing the distribution of Python-based software for use on those environments without requiring the installation of a Python interpreter.