Saturday, 21 April 2018

Simple Python Program

Hi All,

See some simple programs in Python.

#Program 1
# To Add 2 numbers

num1 = 1.2
num2 = 3.3
# Add numbers
result= float(num1) + float(num2)
# Display the result
print('The sum of {0} and {1} is {2}'.format(num1, num2, result))

No comments:

Post a Comment