I tend to do better with nicer teachers, I am able to relax more and focus much better without as much stress, and I get way too nervous and stressed in a classroom with a strict teacher which causes me to do worse in the class
It honestly depends on how strict and how nice we are talking about. Being too nice would have a tendency to lead to being viewed as a pushover or easily walked on, while being too strict will cause animosity which would hinder progress of students
Both can be good. An enthusiastic teacher can help you even more. I was lucky enough to get two great teachers, one was teaching Physics and the other one taught French. Teachers who love their job and care about their students are the best because they get you interested and they make learning a fun experience.
Strict teachers probably teach better more often but people tend to hate them more and pay less attention so all in all they're probably pretty similar.