Are these sentences simple, compound, complex, or compound complex?

1. Tara opened the door, but when she saw the snow, she decided to stay inside.

2. Alaska's flag was designed by a seventh-grade boy who had entered a contest.

3 answers

1. compound complex because it has two independent clauses and one dependent clause

2. complex because it has one independent clause and one dependent clause.
Thank you so much!
It is helpful