Here is an example code snippet in Python that calculates the average of two numbers:

```
# Define the two numbers
num1 = 5
num2 = 7

# Calculate the average
average = (num1 + num2) / 2

# Print the result
print("The average of", num1, "and", num2, "is:", average)
```

In this example, we first define two numbers, `num1` and `num2`, and assign them the values 5 and 7 respectively. We then calculate the average by adding the two numbers together and dividing the sum by 2. Finally, we print the result using the `print()` function. The output of this code would be "The average of 5 and 7 is: 6.0".