Saturday, June 29, 2019

input function in python


""" ***********************************************
programming Language :Python
Tool(IDE) used :Anaconda -> Spider
 date:06-06-2019
 created by:ANIL DURGAM

*****************************************************"""
print('Please enter an integer value:')
x = input()
print('Please enter another integer value:')
y = input()
num1 = int(x)
num2 = int(y)
print(num1, '+', num2, '=', num1 + num2)

output:
Please enter an integer value:

25
Please enter another integer value:

52
25 + 52 = 77

No comments:

Post a Comment

python class topic video