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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 19

  • @elvismunetsi8268
    @elvismunetsi8268 4 ปีที่แล้ว +14

    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

  • @AltaiiSinan
    @AltaiiSinan 3 ปีที่แล้ว

    The best python for beginners i have seen, that one made love python, thank you both!

  • @magnabhb5392
    @magnabhb5392 3 ปีที่แล้ว

    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

  • @yangzhang1787
    @yangzhang1787 3 ปีที่แล้ว

    This is a helpful tutorial.

  • @milinddinesh7359
    @milinddinesh7359 4 ปีที่แล้ว +3

    if you are working in an IDE , then it should automatically put 4 spaces for you when u press enter after the if statement.

  • @itsag2399
    @itsag2399 4 ปีที่แล้ว +1

    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.

  • @dentonhess5810
    @dentonhess5810 3 ปีที่แล้ว +2

    Sometimes it is easier to remember "==" as "equivalent to".

  • @ForgottenGames
    @ForgottenGames 4 ปีที่แล้ว +6

    4:34 Isn't that a Logic Error?.. you expect 'you are a canadian' but are not. how is that a runtime error.

  • @rento8572
    @rento8572 4 ปีที่แล้ว +3

    I don’t know why I forget to put that column 90% of the time.

    • @1broccoli1
      @1broccoli1 4 ปีที่แล้ว +3

      "Colon", not "column".

  • @onee
    @onee 4 ปีที่แล้ว +1

    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.

    • @alvaro8325
      @alvaro8325 3 ปีที่แล้ว

      Yes, I think it's in case you are using other programs to write your code

  • @chrisw1462
    @chrisw1462 4 ปีที่แล้ว +1

    Indenting four spaces is too much for a 70 character line. I set mine to 3 spaces.

  • @deepaksapkota5441
    @deepaksapkota5441 4 ปีที่แล้ว +1

    I get an error 'price' is not defined every time I run the code

    • @dionrivera1163
      @dionrivera1163 4 ปีที่แล้ว +1

      you have to define the variable price: price = 1.00

    • @deepaksapkota5441
      @deepaksapkota5441 4 ปีที่แล้ว

      @@dionrivera1163 thank you! Now it works.

    • @marflage
      @marflage 4 ปีที่แล้ว +5

      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

  • @toqahassan6786
    @toqahassan6786 2 ปีที่แล้ว +1

    there is fast food at restaurants in Canada that is less than $1.00 ????

  • @markcuello5
    @markcuello5 2 ปีที่แล้ว

    Help me