Dec-12-2020, 07:38 PM
Stop thinking about how to write the program and think about ways to solve the problem. If I read off some numbers and you had to add them up, how would you do it? Maybe you would write them all down and add them up. What would you do if you didn't have pencil and paper? How would you add them up then?
After you have multiple solutions to the problem you can start thinking about how to translate those answers into Python code. If you have multiple solutions to start with you will end up with a better program. Some solutions will be easy to translate into clean Python code and some will require convoluted Python code.
After you have multiple solutions to the problem you can start thinking about how to translate those answers into Python code. If you have multiple solutions to start with you will end up with a better program. Some solutions will be easy to translate into clean Python code and some will require convoluted Python code.