WAP to Add Two Numbers in Python

WAP to Add Two Numbers in Python. In this tutorial, we will learn how to write a simple Python program that adds two numbers together. This is a basic programming exercise that can help beginners understand how to use Python for arithmetic operations.

Python Program to Add Two Numbers

sum of two number in python

In the above code-

  • The first line asks a user to enter a number and converts the input from string to float.
  • Similar to the first line the second line asks the user to enter the second number.
  • The third line calculates the sum of two numbers in Python.
  • The last line prints the result.

Happy Coding & Learning

See Also

1 thought on “WAP to Add Two Numbers in Python”

Leave a Comment