Input-Output in python

To display on the standard output device following command may be used.

print("This is to print on screen")

Later we will discuss how to send output in files etc.

Take input in Python:
input command may be used to take input from the user as following

n=int(input("enter the number"))
print(n)

    Output:
    100 (if i entered 100).

Program to take input two numbers and print the sum of the given numbers.

n1=int(input('enter first number\n'))
n2=int(input('enter second number\n'))
n=n1+n2;
print("sum:",n)

    Output:
    30 [eg. if enter 10 and 20].

how to take input in python
Click Here

Video/ C Introduction

Watch video in full size