Photo by Pixabay
Here’s a simple and easy-to-understand way to find the average of three numbers in Python:
# Define the three numbers
number1 = 5
number2 = 10
number3 = 15
# Calculate the sum of the numbers
total = number1 + number2 + number3
average = total / 3
# Print the result
print("The average of the three numbers is:", average)
Leave a Reply