EEs don’t have to code as part their job or coursework. They can only take a mandatory beginning programming class. When I received my EE degree a few years back, there was only one programming class that I had as an elective. Then I went on to earn a master’s degree in computer science.
The main job of an electrical engineer is to design hardware circuits. All of this can be done without having to write any code. For simulations, one could use MATLAB or C++ (often combined avec Simulink). Python is another option. You can also simulate circuits with programs such as and LTspice without having to write traditional code.
Many EE’s end up working with embedded system. It is important to know how to program the microcontroller(s), even if you are only using it for testing. The majority of embedded firmware is written using C. C++ is the second most popular language.
Many EEs abandon hardware design and instead focus on embedded system firmware writing. Their hardware background gives them an edge over others.