You can calculate the average of two numbers plus three in Python using the arithmetic operators like this:
main.py55 chars7 lines
Output:
main.py4 chars2 lines
In the above code, we first assign values to the variables 'a' and 'b'. Then we calculate the sum of those two numbers by using the '+' operator and divide it by 2 to get the average. Finally, we add 3 to the average to get the desired result.
gistlibby LogSnag