Wednesday, 25 July 2018

Two Number Sum in Python

# Simple Python program to Add Two Numbers

number1 = input(" Please Enter the First Number: ")
number2 = input(" Please Enter the second number: ")

# Using arithmetic + Operator to add two numbers

sum = float(number1) + float(number2)
print('The sum of {0} and {1} is {2}'.format(number1, number2, sum))



No comments:

Post a Comment

Excel read, Two days different in Python

Program: import pandas as pd df = pd.read_excel('CompleteData2.xlsx', sheet_name='Test') df.DOA = pd.to_datetime(df[...