INPUT AND
OUTPUT
INPUT: Input
is data entered by user (end user) in the program.
In python, input () function is available for
input.
Syntax for input() is:
variable
= input (“data”)
Example:
>>> x=input("enter the name:") enter the
name: george
>>>y=int(input("enter
the number"))
enter the number
3
#python accepts
string as default data type. conversion is required for type.
OUTPUT: Output can be displayed to the user using Print statement .
Syntax:
print
(expression/constant/variable)
Example:
print
("Hello") Hello
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.