Python-2
Python-2
This is the official Python website and it will detect the operating system
would recommend you to download Python. I would recommend you to
version of Python 3. Installation steps are pretty simple.
print() and Input() Function
The print() function displays the given object to the standard output device (screen) or to the te
other programming languages, Python print() function is most unique and versatile function.
print(objects)
where objects - An object is nothing but a statement that to be printed.
Example:
print("Python language is very easy to use.")
a = 10
# Two objects are passed in print() function
print("a =", a)
b=a
# Three objects are passed in print function
print('a =', a, '= b')
Output:
Python language is very easy to use.
a = 10
a = 10 = b
Python provides the input() function which is used to take in
Let's understand the following example.
Example -
name = input("Enter a name of student:")
print("The student name is: ", name)
Output:
Enter a name of student: Ajeet
The student name is: Ajeet