PY4E - Conditionals (Chapter 3 Part 1)

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I already took the "Programming For Everybody (Getting Started With Python)" class by Dr. Charles Severance, via the Coursera learning platform. Great class. I highly recommend it.

NBT
Автор

Dr Severance thank you for everything !!

windkl
Автор

I appreciate these videos a lot but the audio on this is dreadful.

Barbov
Автор

C uses braces, "{" and "}", and tons of other languages followed suit. Braces are okay, but create the opportunity for argument---where is the best place to put these braces? Some languages make braces optional if only one line of code follows the conditional, but again argument---is it best practice to put them in anyway? Finally indenting the code within braces is optional, but not so much argument as nearly everyone does include some indent, even if not strictly necessary. However plenty of disagreement on tabs, spaces, or a combination of both. Since indent is optional and the compiler doesn't care, it's easy to end up with a mishmash of indenting styles.

Which brings us to indenting Python: #1 Tabs or spaces? #2 How much to indent? I'm going to guess that because programmers' editors have settable tab stops (every 3rd column, every 4th column, etc), and that the interpreter doesn't know what your setting is, that putting spaces on one line and tabs on the next will cause the interpreter to throw an error.

At least this isn't Pascal, which used "begin" instead of "{" and "end" instead of "}".

ScottyDMcom
Автор

I will look into. Python is supposed to be good for AI!

compcitizen