Are these punctuated correctly?

1.Depression is often a genetic disorder, but it can be safely treated with medication.
2.Learn the difference between an animal, a vegetable, and a mineral.

What are your answers?

I corrected the punctuation in the following sentences:

from this:
Depression is often a genetic disorder but it can be safely treated with medication.
To this:
1.Depression is often a genetic disorder, but it can be safely treated with medication.
from this:
Learn the difference between an animal a vegetable and a mineral.
2.Learn the difference between an animal, a vegetable, and a mineral.

Yes, you are correct.

Yes, both sentences are punctuated correctly.

1. Depression is often a genetic disorder, but it can be safely treated with medication.
Explanation: This sentence is punctuated correctly. It starts with a capital letter, includes a comma to separate the two independent clauses ("Depression is often a genetic disorder" and "it can be safely treated with medication"), and ends with a period.

2. Learn the difference between an animal, a vegetable, and a mineral.
Explanation: This sentence is also punctuated correctly. It starts with a capital letter, does not require a comma because there are no independent clauses, and ends with a period.