I have just started working on a program in Python that calculates various types of interest. Every time I try to run it, it tells me that there's an invalid syntax and it highlights the red "if". If I delete that line of code completely, it then tells me that "print" is invalid. If I delete that, it tells me that the "def" in front of "main()" is invalid, and so on and so forth....
I've never run into this problem before, and I'm very confused. I've rewritten the program a few different ways and each time it highlights something that it shouldn't, like a correctly written statement or variable. I assume this is something simple that I'm overlooking, but I'm completely baffled nonetheless.
Please help me figure out what's going on here.
Side note: I've run other programs I've made, and even wrote a short test program with similar functions to make sure the program or computer wasn't at fault and everything worked fine in all of the other programs. This leads me to believe something is wrong within the program.
I am somewhat new to programming so please speak in somewhat layman's terms for me.
I've never run into this problem before, and I'm very confused. I've rewritten the program a few different ways and each time it highlights something that it shouldn't, like a correctly written statement or variable. I assume this is something simple that I'm overlooking, but I'm completely baffled nonetheless.
Please help me figure out what's going on here.
Side note: I've run other programs I've made, and even wrote a short test program with similar functions to make sure the program or computer wasn't at fault and everything worked fine in all of the other programs. This leads me to believe something is wrong within the program.
I am somewhat new to programming so please speak in somewhat layman's terms for me.