add 3 numbers
Here's a simple Python program that adds three numbers: ```python # Define the numbers to be added num1 = 10 num2 = 20 num3 = 30 # Add the numbers result = num1 + num2 + num3 # Print the result print("The sum of", num1, num2, "and", num3, "is:", result) ``` When you run this program, it will output: ``` The sum of 10 20 and 30 is: 60 ``` Alternatively, you can use a function to add the numbers: ```python def add_numbers(num1, num2, num3): return num1 + num2 + num3 num1 = 10 num2 = 20 num3 = 30 result = add_numbers(num1, num2, num3) print("The sum of", num1, num2, "and", num3, "is:", result) ``` This will produce the same output as the previous example.