1//2 * base * height
I got 0 as an answer instead of zero, which puzzled me for a while. I wonder what went wrong there. Since it was not the ** operator, the leftmost operation should have been evaluated first. Anyhow, I tried: base * height * 1//2 and base * 1//2 * height
They both worked just fine, but in the end I decided to go with 0.5 instead of 1//2. I think it is fair to think that the area of some triangle may not be integers. Later, I figured …show more content…
Even though I only have preliminary exposure to python, I am eager to write some more codes, and I am looking forward to solving any problems arising during the process. At this point, it may be too soon to conclude that I pretty much enjoy programming, but I am quite certain, based on my experience, that I will be spending significant amount of time practicing and learning. Just like last week, the technical terms is still a little overwhelming for me. Recently, life seemed to get in my way, but I managed to make a time for my study. I think I am going to make some flashcards. That should solve my problem. As for the practical part, I plan to spend more time on practicing. I think it will help me memorize the basic functions and syntax of python more quickly. Today I went over the online textbook briefly, and the upcoming chapters look relatively challenging compared to the previous chapters. I am positive that I will be a worthwhile experience. Really looking forward to the next week’s assignment.