Understand data types and mathematical operations

n1 = input( ' Please enter the first number ' )
n2 = input( ' Please enter the second number ' )
n3 = input( ' Please enter the third number ' )
n4 = input( ' Please enter the fourth number ' )

sum2 = int(n1)+int(n2)+int(n3)+int(n4)
print( ' The sum of the four numbers is: {} ' .format(sum2))

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324521505&siteId=291194637