This Python program allows you to add two numbers of your choice. Follow the instructions to input values for 'a' and 'b', and the program will display the result.
- Run the program.
- Enter a value for 'a' when prompted.
- Enter a value for 'b' when prompted.
- View the result of the addition.
# Welcome text
print("Welcome to your simple adder.")
print("-----------------------------")
# Input for 'a'
a = input("Enter a value for a: ")
# Input for 'b'
b = input("Enter a value for b: ")
# Display inputs
print(f"\nValues entered:\n a = {a}\n b = {b}")
# Calculate and display the result
result = int(a) + int(b)
print(f"\nThe result is: {result}")
# Run the program
# Enter a value for a: 100
# Enter a value for b: 50
# Output:
# Values entered:
# a = 100
# b = 50
# The result is: 150