what are the two formal fallacies?

My answer- fallacy of denying the antecedent and fallacy of affirming the consequent. I don't know if this is correct.

It looks right.

http://www.triviumpursuit.com/articles/formal_informal_fallacies.php

The two formal fallacies you mentioned, the fallacy of denying the antecedent and the fallacy of affirming the consequent, are actually examples of invalid argument forms known as denying the antecedent and affirming the consequent. However, they are not the only formal fallacies.

Formal fallacies are deductive argument patterns that are logically incorrect, meaning their structure does not guarantee the truth of their conclusions. Here are two commonly recognized formal fallacies:

1. Affirming the consequent: This fallacy occurs when someone mistakenly concludes that if a particular conditional statement (if-then) is true and its consequent is true, the antecedent must also be true. The correct logic is that if the antecedent is true, it may or may not produce the consequent. For example:
- If it is raining, then the ground is wet.
- The ground is wet.
- Therefore, it is raining. (Incorrect)

2. Denying the antecedent: This fallacy occurs when someone mistakenly concludes that if a particular conditional statement (if-then) is true and its antecedent is false, then the consequent must also be false. The correct logic is that if the antecedent is false, it tells us nothing about the truth of the consequent. For example:
- If it is raining, then the ground is wet.
- It is not raining.
- Therefore, the ground is not wet. (Incorrect)

So, to answer your question, the two formal fallacies you mentioned, denying the antecedent and affirming the consequent, are actually examples of invalid argument patterns rather than broader categories of formal fallacies.