Skip to content

Joseph-T-Gordon

A complete log of all recent projects and skills

Menu
  • About me
  • Posts/Projects
  • Resume/Certifications
Menu

Post #53 (Python Programming) – Errors playing hard to get

Posted on June 24, 2023June 26, 2023 by admin

As I’ve mentioned in some of my previous posts python is an interpreted language, meaning it’s parsed as it is being executed. This can lead to an interesting issue, look at the following code.

Ex:

Temp = int(input(“Enter the temperature in celsius: “))

if Temp <= 0:

print(“Might want to wear a coat”)

else:

prin(“At least it isn’t below freezing”)

You can probably see the error right away it’s the prin, however if you run this Python will not detect anything right away and if you don’t enter a value greater than 0 it will not return any error. It will only see that error if that execution path is ran. This is why it’s important to check every execution path and debug your code.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

© 2025 Joseph-T-Gordon | Powered by Minimalist Blog WordPress Theme