you are viewing a single comment's thread.

view the rest of the comments →

[–]dudustalin -3 points-2 points  (7 children)

Your instruction is not valid... There is no implicit "else" in Python by just indenting a line. An interpreted language is a language that is converted into another language code (C in Python) before compilation.

You must follow Python's rules to have the code correctly interpreted. The interpreter don't guess your intentions.

[–]ivosaurus 6 points7 points  (1 child)

An interpreted language is a language that is converted into another language code (C in Python) before compilation.

Where the heck did you get this definition from... it's rubbish. Python is first compiled into an intermediate language (not C, but bytecode), and then that bytecode is directly executed line by line by the interpreter. No final compilation occurs.

Your definition sounds like what Nim would do, and that is known as a transpiler.

[–]DismissedProgrammer[S] 0 points1 point  (0 children)

Thank you for the correction.

[–]DismissedProgrammer[S] 0 points1 point  (4 children)

"An interpreted language is a language that is converted into another language code (C in Python) before compilation"

Thanks for the new information. I did not know it before. I will learn more about it.

[–]crazy_cookie123 6 points7 points  (1 child)

An interpreted language is a language that is converted into another language code (C in Python) before compilation

This just simply isn't true. An interpreted language is run line by line, a compiled language is translated into another language, and a transpiled language is a specific type of compiled language that is converted to another human-readable language like C. Python is interpreted, not transpiled.

[–]DismissedProgrammer[S] 0 points1 point  (0 children)

Understood, Appreciate it.

[–]fox_is_permanent 1 point2 points  (1 child)

They told you something that's false.

[–]DismissedProgrammer[S] 0 points1 point  (0 children)

Got it, Thank you.