Conditional Logic | Python for Beginners [19 of 44]
ฝัง
- เผยแพร่เมื่อ 17 ก.ย. 2019
- Of course you'll want code which can make decisions. The core of this is the humble if statement. Full 'Intro to Python' course on Microsoft Learn: aka.ms/MSLearnPython
Sample code: aka.ms/PythonGettingStarted
Watch the entire series: aka.ms/PythonBeginnerSeries
#microsoftdeveloper #pythonforbeginners #learntocode - วิทยาศาสตร์และเทคโนโลยี
The best tutorial on Python I have watched so far. You are doing a great job. I have no programming background but I am grasping your teachings very well. Keep up the good work
The best python for beginners i have seen, that one made love python, thank you both!
It's the best tutorial ever. I learned in a few lessons what i haven't in 4 hours of the last tutorial i saw
This is a helpful tutorial.
if you are working in an IDE , then it should automatically put 4 spaces for you when u press enter after the if statement.
The video was wonderful but the string.lower() if we don't put it will result in logical error not the run time error according to me.
Sometimes it is easier to remember "==" as "equivalent to".
4:34 Isn't that a Logic Error?.. you expect 'you are a canadian' but are not. how is that a runtime error.
I don’t know why I forget to put that column 90% of the time.
"Colon", not "column".
She says that you should make it a habit to add four spaces, but when you press enter after an if-statement Visual Studio Code automatically puts an indentation after the if-statement.
Yes, I think it's in case you are using other programs to write your code
Indenting four spaces is too much for a 70 character line. I set mine to 3 spaces.
I get an error 'price' is not defined every time I run the code
you have to define the variable price: price = 1.00
@@dionrivera1163 thank you! Now it works.
You need to declare the variable named price before using it in the if condition. Like so: price = 2. However, make sure that you convert the price into int or float. I will not tell you how, so if you do not remember, it'll be a little assignment ;) Then continue with the rest of the code
there is fast food at restaurants in Canada that is less than $1.00 ????
Help me