2. Branching and Iteration

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 281

  • @walawave
    @walawave 4 роки тому +441

    To whoever made the subtitles for this 40+ minutes video. Thank you.

  • @鄭心和
    @鄭心和 4 роки тому +201

    pre labeling
    0:02:08​ Strings
    0:03:48 (Coding)
    0:06:31 Input/Output:print
    0:08:21 (Coding)
    0:09:57 Input/Output:(" ")
    0:12:14 (Coding)
    0:14:00​ Comparison operators on int , float , string
    0:17:06 MIT map
    0:18:00
    0:19:58 Control flow - branching
    0:20:00 0:22:00
    0:24:51 ​Indentation
    0:25:46 =vs== 0:28:00​
    0:28:58 Control flow : while loops
    0:31:57 Control flow : while and for loops
    0:35:09 ​Control flow : loops
    0:36:44 range (start , stop , step)​ 0:38:00​
    0:39:42 (Coding)
    0:41:06 break Statement
    0:42:26 for vs while loops

  • @osamakamal7171
    @osamakamal7171 3 роки тому +62

    Love MIT for their CS OCW!!! One comment to add here. When you ask Python to compare two strings (like mentioned in the video "a" > "b" and the result is False) in the backend, Python is comparing their ASCII values (ASCII value of "a" = 97 and ASCII value of "b" = 98. Hence False)

    • @ChandravijayAgrawal
      @ChandravijayAgrawal 3 роки тому +5

      thanks

    • @r4ko276
      @r4ko276 Рік тому +1

      I dont know if this is entirely true, if i do "ab" == "ba". the result is false. (She said something about lexicographical)

    • @cerulity32k
      @cerulity32k Рік тому +2

      ​@@r4ko276String equality checks if two strings have the same contents. Checking if a string is greater than another string (string inequality) checks if the first string comes after the second string if you were to sort them alphabetically.

  • @bjr816
    @bjr816 4 роки тому +44

    Kind of wish I got to experience CS at MIT. I loved my professors but this is a professor I know I'd like and learn alot from. Plus MIT's reputation is unmatched.

    • @PeejTastic
      @PeejTastic 2 роки тому +1

      Same, except for me it would've been math/statistics. MIT was the only school I couldn't get accepted into (it was my dream school as a high school student). Having access to this open courseware in my 30s gives me a chance to check some of it out (just in a different subject).

  • @hemarathroy4121
    @hemarathroy4121 4 роки тому +5

    I am very lucky and happy to see the smiley ,energetic and enthusiastic face of ANA mam ,when she tried to listen the question that the student asks.BUT AT OTHER PLACES , THIS HAPPENS RARELY BUT NOT IN MIT.

  • @PeejTastic
    @PeejTastic 2 роки тому +12

    Me and a fellow colleague are leaping into Python (my native language being R). The lecture videos are well-paced and the lecturing style is top notch! I lecture the occasional statistical programming course, and it's not always easy to keep it interesting and engaging like it is here.

  • @danielkinyanjui5296
    @danielkinyanjui5296 4 роки тому +17

    You're a good teacher, accessible yet giving your students a chance to learn.

  • @diggitycat6233
    @diggitycat6233 4 роки тому +23

    For those curious about how Dr. Bell commented out certain lines of code here's the shortcut list,
    Single line comment
    Ctrl + 1
    Multi-line comment select the lines to be commented
    Ctrl + 4
    Unblock Multi-line comment
    Ctrl + 5
    P.S: Got this from Stack Overflow so due credit to the actual authors for this query.

  • @DarthAbhi
    @DarthAbhi 7 років тому +60

    Dr.Bell, can't thank you enough for the great explanation.

  • @oneofthesidemen
    @oneofthesidemen 8 років тому +78

    THANK YOU, MIT COURSEWARE and sponsors! ❤️

  • @mahiee24
    @mahiee24 3 роки тому +4

    Had somebody taught flow control statements as clearly as Dr.Bell my coding journey would have been at stratospheric levels...these lecture ignited my hopes of becoming a good programmer...

  • @DanielFerreira-gu1di
    @DanielFerreira-gu1di 7 років тому +13

    Really good for a start with Python. Great work Dr. Bell (and Professor Grimson).

  • @vishalmalaye
    @vishalmalaye 5 років тому +8

    Dr. Ana Bell is great teacher.❤❤❤ You are very good at explaining and in all perspective. You are best.Thanks MIT for Dr. Ana Bell.
    Thanks MIT for OCW.MIT is best and doing great work.

  • @unrockbaer
    @unrockbaer 5 років тому +17

    Really liked the Zelda example, loved the flipping table :) Well played, Dr. Bell!

  • @nitirajdaby2554
    @nitirajdaby2554 10 місяців тому +1

    What a smooth lecture ! Thank you ! You helped me understand Python. My professor did a terrible job teaching this. Thanks MIT !

  • @xiaoningdong1654
    @xiaoningdong1654 5 років тому +15

    She is so adorable, I really love her lessons. Thanks MIT.

  • @premkumar-zp7gs
    @premkumar-zp7gs 2 роки тому +1

    the best lecture on python, the reason why mit is a top college in the world

  • @iam_sangu
    @iam_sangu 7 років тому +6

    Wonderful lectures by Prof. Ana Bell. Thank you MIT OCW.

  • @saimahossain332
    @saimahossain332 4 роки тому +12

    you're brilliant Dr. Bell. love your lectures💜

  • @barlov_filange
    @barlov_filange Рік тому +2

    The idea behind ocw is profound. By distributing knowledge to the whole world for free, MIT is paying tribute to the geniuses like faraday, curie, ramanujan etc... Who produced phenomenal works despite of not having the proper access to the knowledge they needed.

  • @ashimo5214
    @ashimo5214 2 роки тому +1

    38:54
    both codes ARE WORNG
    SHOULD BE
    for i in range(5, 11, 2 ):
    print(i)
    NOT LIKE :
    x = 0
    for i in range(5, 11, 2 ):
    x += i
    print(x)
    I get output : 21 with that code for some reasons

  • @stevemilo6935
    @stevemilo6935 9 місяців тому

    This is the best MIT has to offer.
    Good thing its free.

  • @GoutamDAS-ls1wb
    @GoutamDAS-ls1wb 4 роки тому +2

    Superb video of excellent teaching. I wish she was my professor when I was an undergrad.

  • @NANA-yh2wx
    @NANA-yh2wx 5 років тому +9

    Dr Bell
    Your class was comfortable and interesting. Thank you for not writing on the board.

  • @tawfeeqmuallem9086
    @tawfeeqmuallem9086 6 років тому +26

    if course_grade == A:
    print("this teacher is amazing")
    elif course_grade in range (A, C+):
    print("This teacher is really good!")
    else:
    if course_grade

  • @damickillah
    @damickillah 4 роки тому +4

    OMG, these are finally in HD!

  • @abhinavmathur6072
    @abhinavmathur6072 6 років тому +3

    Thank you open courseware for providing such high quality leacture and materials..hope you have a great day😊

  • @jordymunozaravena3286
    @jordymunozaravena3286 7 років тому +20

    I love your problem sets. They really made me want to hit my head with a piece of wood over and over again. Real learning guys.

    • @user-kp5kg5dl8h
      @user-kp5kg5dl8h 6 років тому

      Jordy Muñoz Aravena
      The ones found on the website? The ones that make you have to look up everything yourself before you can even do them?

    • @shivang581
      @shivang581 6 років тому

      Hey! Could you please share the link of the problem sets? Thank You!

    • @shivang581
      @shivang581 6 років тому

      @Виктор Мещеряков THANK YOU SO VERY MUCH!

  • @billmoran3812
    @billmoran3812 4 роки тому +3

    Excellent lecture. Makes me wish I were back as a student. this is the best explanation of for & while loops I have seen. I wish I could take this course, but I no longer live in Boston.

  • @rinkushortsdaily
    @rinkushortsdaily 8 місяців тому

    I really love this lectures and completed my some basic python syntax and basic algorithm related concepts thanks for this contribution.

  • @taskfyai
    @taskfyai 5 років тому +5

    thank you Dr Ana Bell this was a really helpful and fun course !

  • @gackerman99
    @gackerman99 3 роки тому +2

    you can actually use a for-loop to get input in Python - create a simple iterator class where __next__ returns a value from a call to input().

  • @algemmegla9002
    @algemmegla9002 4 роки тому +1

    Regarding range(stop,start,step) 40:30: Normally num-1, but in this case, we're going to the end minus "two". (num - 2). I came across a component of this topic on stackoverflow, where someone described the end of the range as "minus two", which left me puzzled, so I thought I'd post.

    • @mvisperas
      @mvisperas 4 роки тому +1

      Python always has the extra +1 whenever there is a range. This is different if you come from other programming languages but once you get used to it it will not bother you. Also true when slicing a string.
      For example:
      # 1 1 1
      # 0 1 2 3 4 5 6 7 8 9 0 1 2
      a = "hello, world!" # h e l l o , w o r l d !
      b= a[1:8]
      print(b)
      # output
      # ello, w

    • @algemmegla9002
      @algemmegla9002 4 роки тому

      @@mvisperas In the case of range(5,11,2) From five up to but not including 11. It went 5...7...9 It stops at 9, and She says "...So we're going to the end MINUS ONE...." But actually it's going to the end, MINUS TWO. But I still agree with your comment. Normally, if it were range (5,11), with one hop as the default, it would be getting to the end (11) minus one. It was just a small thing, but thought I'd mention it. Yes, I see how you're thinking.

    • @algemmegla9002
      @algemmegla9002 4 роки тому

      Another example: Two hops. It goes to the end "minus two".
      for num in range(6,26,2):
      print(num, "", end="")
      6 8 10 12 14 16 18 20 22 24
      I also tried to index a range, but you have to change it to a list first because range is immutable. Range 20 up to, but not including, 50. Two hops. So up to the end "minus two".
      range_2 = list(range(20,50))
      print(range_2[0:30:2],"", end="" )
      [20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]

    • @mvisperas
      @mvisperas 4 роки тому +1

      @@algemmegla9002 The end value is always the highest value without being equal to or exceeding the stop value - you can treat it as always less than. This statement is true whether the step value is 1, or 2, or 3, or whatever step value you choose. Thus if you do range(5, 11, 3) then the count is 5 ... 8. It won't do 11 as it is equal to the stop value.

    • @algemmegla9002
      @algemmegla9002 4 роки тому +1

      @@mvisperas I understand. Whatever is equal to the stop value gets ignored. I think we're both saying the same thing, but we're just wording our examples differently. As you mentioned in your example, you could say it stops at 11 because it is equal to the stop value, "and" you could also say it goes up to the end "minus two" (or 8) We're both saying the same thing. It's just different ways of explaining the concept.

  • @obli8984
    @obli8984 3 роки тому +1

    OBLI WATCHED THIS FROM SRI LANKA.TO BE HONEST NONE OF UNIVERSITIES OF SRI LANKA PROVIDE GOOD LECTURES LIKE THESE

  • @jikachu926
    @jikachu926 4 роки тому +4

    her legend of zelda example was a really excellent example to use and keep students engaged

  • @hasankirca8076
    @hasankirca8076 5 років тому +3

    VERY VERY thanks ,MIT open coursewarde.

  • @ChandravijayAgrawal
    @ChandravijayAgrawal 3 роки тому +1

    She is second(I'm confused) best professor i ever got on MIT

  • @esergey12
    @esergey12 3 роки тому +7

    Adorable teacher. Excellent lecture.

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому +1

    9:40 get input from user...every thing id a string, evento the numbers

  • @mikeearls126
    @mikeearls126 6 років тому +70

    This woman is so adorably awkward, nervous and brilliant.

    • @ChandravijayAgrawal
      @ChandravijayAgrawal 3 роки тому

      not really awkward but i think this is her first lecture on this topic

  • @BackWithTheBoom
    @BackWithTheBoom 4 роки тому +3

    thank you Dr Bell ! , rock on! better explained than my school lessons 4sure

  • @muthabukujohn5089
    @muthabukujohn5089 6 років тому +67

    take = "Thank you"
    name = "Dr. Ana Bell"
    print (take + ", " + name)

  • @dgates6165
    @dgates6165 3 роки тому +4

    I love this teacher!! She's so funny, but in the driest way possible!! It's great! 😅

  • @harshitarawat1411
    @harshitarawat1411 4 роки тому +4

    Transition from if-else to while loop tells how much i took the loops for granted .

  • @christianhamilton3927
    @christianhamilton3927 3 роки тому +1

    Who knew Darlene would be such a good professor

  • @abdullahchowdhury9589
    @abdullahchowdhury9589 4 роки тому +4

    I want to ask a question not related to syllabus but a great tips Dr. Ana Bell used in this lecture, Lecture No 2(Branching and Iteration) and I have question in Time:39.48/43.30.... Here Dr. Ana used a great tips: She just select some sort of lines and deleted the "#" sign in a single moment.... I want to know how can I do it the same thing on Spyder.... Please comment to me... If you know please give me suggestion... Please Please.... (From INDIA)

  • @thankyou_guruji
    @thankyou_guruji 2 роки тому +1

    SHE IS SUCH A GOOD TEACHER

  • @flickmew99
    @flickmew99 3 роки тому +1

    I want to learn a lessong everyday if she is my teacher. I will never get tired or bored

  • @oluwadaraadepoju5832
    @oluwadaraadepoju5832 2 роки тому +1

    Dr Bell, you are the best❤❤

  • @jyvben1520
    @jyvben1520 Рік тому

    to improve examples e.g. for string print( "you_can", "show", "where_the_spaces_are_added", "!" * 3 )
    the example code blocks could have a colored background or have a colored border

  • @BC-lg1dg
    @BC-lg1dg 4 роки тому +2

    Присоединяюсь. к отзыву "walawave
    ", за субтитры. Thank you very much

  • @TheAL9090
    @TheAL9090 2 роки тому

    32:21.... y no n += 1?? also loving the Corse so far, did problem sets 0 and 1a before watching this, would love to go to MIT at some point in my life to get a Comp sci degree

    • @maar2001
      @maar2001 2 роки тому

      Bro where can I get the problem sets and where can I install the notes prof Ana made that she shows here?

  • @simonialee1114
    @simonialee1114 6 років тому +1

    best python tutorial ever

  • @trenholmelodge1820
    @trenholmelodge1820 3 роки тому

    It would help that when Ana points to the board and makes a comment, the camera also shows the board and not the picture of Ana talking.
    thanks for the free lectures

  • @leijiang-kf9ql
    @leijiang-kf9ql 2 роки тому

    00:19:58 if/elif/else

  • @rithuvarnakm3575
    @rithuvarnakm3575 3 роки тому

    I am not getting that one at 12:26
    I am doing this in Google colab,
    Is that the problem

  • @samagrabarnwal
    @samagrabarnwal 4 роки тому +1

    great course but can anyone tell me how she removed and added just the hashtags at 5:03??

    • @samagrabarnwal
      @samagrabarnwal 3 роки тому +1

      @@secondary2415 do you know which shortcut she used?

    • @samagrabarnwal
      @samagrabarnwal 3 роки тому

      @@secondary2415 oh I found it, it's okay, thanks

  • @tahaozturk5135
    @tahaozturk5135 4 роки тому +5

    As a mechanical engineer who is interested also in CS. These MIT courses are great way to learn

  • @ianmark4543
    @ianmark4543 6 років тому +4

    Could someone please explain what's the difference between the "+=" and "=+" operators?

    • @marco.nascimento
      @marco.nascimento 6 років тому +7

      there is no such a sintax in python as "=+", only "+=". And "x += 1" is the same thing as "x = x + 1"

  •  4 роки тому

    19:40 three ways to make decitions

  • @scullyy
    @scullyy 2 роки тому

    "b" is greater than "a" because __lt__ / __gt__ methods of the string class were made to convert the characters to ascii values and return the comparison of those values?

  • @harunrashid4us
    @harunrashid4us 3 роки тому

    Thanking MIT OCW Please upload more 💙

  • @bhanugupta4871
    @bhanugupta4871 5 років тому +4

    mam, i really loved the way you teach.

  •  4 роки тому

    28:10 While loop insted of if statement

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому

    5:00 the estar operator with strings

  •  4 роки тому

    9:55 to get input from user

  • @techgamer1333
    @techgamer1333 4 роки тому +1

    Ana Bell ❤❤

  • @silviapabon1282
    @silviapabon1282 3 роки тому

    Anaconda allows intereacitivty: IPython + Spyder (inspire on Matlab, (Matplotlib),+ support for other languages like ruby, R, Julia, Haskell ....etc. wow I am going to explore that tomorrow...

  • @andrewjankowski6981
    @andrewjankowski6981 2 роки тому

    I can't get enough my brain is finally feeling euphoric

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому +1

    13:14 true por false. Comparing things

  • @leixun
    @leixun 4 роки тому +1

    *My takeaways:*
    *for loop* vs *while loop* 42:13

    • @leixun
      @leixun 4 роки тому

      Sreedevi Sivakumar ahh, where did you see me?

    • @leixun
      @leixun 4 роки тому

      Sreedevi Sivakumar good choices. If you want to learn deep learning, check out DeepMind 2020 lectures.

  • @timarivobatis1182
    @timarivobatis1182 7 років тому

    how do you remove the # from multiple lines in spyder? whats the hotkey.
    theres probably also a hotkey to a add it.
    so comment/ uncomment selected lines. like at 39:48

    • @rizwanzeb5218
      @rizwanzeb5218 7 років тому +6

      highlight the text and press ctrl+1

    • @abdullahchowdhury9589
      @abdullahchowdhury9589 4 роки тому +1

      @@rizwanzeb5218 Thank you very much... so happy to get my solution

  • @nickfrazier2839
    @nickfrazier2839 8 місяців тому

    For the
    while main_condition:
    while sub_condition:
    expression_a()
    break # This break always happens
    expression_b() # This will never execute
    expression_c()
    What is the point of having expression b if it will never execute?

  • @ShubhamRaj-mu8ol
    @ShubhamRaj-mu8ol 5 років тому +5

    Can someone tell me how she deleted and adds character to each line at once. Can it be done on windows?

    • @abdullahchowdhury9589
      @abdullahchowdhury9589 4 роки тому

      I asked same question.... Even I don't know how she can able to do it... By looking at her screen view I think she uses Windows Machine... Please brother if you get your answer please reply to me also....

    • @diggitycat6233
      @diggitycat6233 4 роки тому

      If you're using an IDE like Spyder, here's the shortcut key to it,
      Single line comment
      Ctrl + 1
      Multi-line comment select the lines to be commented
      Ctrl + 4
      Unblock Multi-line comment
      Ctrl + 5
      P.S: Got this from Stack Overflow so due credit to the actual authors for this query.

    • @ShubhamRaj-mu8ol
      @ShubhamRaj-mu8ol 4 роки тому

      @@diggitycat6233 A lot of thanks to you sir😄

  • @覃煎鱼
    @覃煎鱼 5 років тому

    for the maze game, " n=input("you are in a deep forest.
    ****************

    ****************
    Go left or right?")"under the while loop doesn't need any print command and it just repeats itself?

  • @Clyffcarlock1
    @Clyffcarlock1 3 роки тому

    Why isn't "Type a number..." included in the output, as it is included within the quotation marks?

  • @thomaskennedy5336
    @thomaskennedy5336 7 років тому +1

    So do we need spyder? because I'm using 3.6 and some of this doesn't seem to translate.

  • @snuffy5321
    @snuffy5321 2 роки тому

    Dr Bell is a legend

  • @liza10o
    @liza10o 5 років тому

    The 'if' nested in an 'if' would only be considered if the parent 'if' is true, the 'else' nested in that won't ever be considered, then why use it at all?
    Also if all the nested 'if's have same condition during nesting then if they are true, it'll execute them all at once, so what is the use of that?
    What we want is that it asks us the question and show us the forest screen until we enter a 'left', so what we want it to do is to repeat this 'if' condition again and again so that it asks us that question again and again
    X=input (" left/right..?")
    If x== "right":
    Else:
    How can we do that?
    I didn't understand the need for while here, because for it to ask us the same question again an again we will have to run this code again and again, and that can be done with an 'if-else' condition as well.

    • @AbhishekGupta0710
      @AbhishekGupta0710 5 років тому

      We used a while loop because we don't know how many times the user will enter right.
      x = input (" left/right..?")
      If x== "right":

      Else:
      will take the input only once. What if I want to go right twice?
      Let's say, you use 7 nested if statements, the program would ask the user for direction 7 times. Not more, not less. What if I want to go right 10 times? I wouldn't be able to.
      Notice the condition of her while loop. It doesn't matter whether I type "right" once or 10 or 1000 times. The output is dependent on my answer, not on the number of times I type that answer.
      I hope you understand.

    • @liza10o
      @liza10o 5 років тому

      @@AbhishekGupta0710 yea, but that while command won't ask for input after I've entered it once, would it?

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому

    24:50 indentation

  • @asdaware7718
    @asdaware7718 7 років тому

    nice lectures delivery....dr bell

  • @salehaboutaama7370
    @salehaboutaama7370 6 років тому

    at 25:16
    what's the use of the nested if?
    and when will it be used!

    • @maverick.3957
      @maverick.3957 5 років тому

      To check if a condition is true inside a condition. For example
      If 5 == 5:
      If 6 == 7:
      Print("Hello")
      First it will check if 5 is equal five which is true then it checks if 6 is equal to 7 which is false so it won't print "hello" it goes from up to down. Hope that helps 😊.

    • @Oliver-nb2iu
      @Oliver-nb2iu 4 роки тому

      the nested if prints the quotient of x and y. however, you can't do this if y=0 as you will get a zero division error (if x=0 and y=0, 0/0 can't be evaluated)

  • @ahmedsalam9251
    @ahmedsalam9251 7 років тому +7

    How can i delete # on each line for one time?

    • @santos8146
      @santos8146 6 років тому +1

      just select all lines and ctrl+1

  • @VeteranIRL
    @VeteranIRL 4 роки тому +1

    did any one made expanding for the code of the game that puts sad face and many tables after entering right more than two times?

    • @semtex6412
      @semtex6412 4 роки тому

      𝚗 = 𝚒𝚗𝚙𝚞𝚝("𝚈𝚘𝚞 𝚊𝚛𝚎 𝚒𝚗 𝚝𝚑𝚎 𝙻𝚘𝚜𝚝 𝙵𝚘𝚛𝚎𝚜𝚝, 𝙶𝚘 𝚕𝚎𝚏𝚝 𝚘𝚛 𝚛𝚒𝚐𝚑𝚝?")
      𝚠𝚑𝚒𝚕𝚎 𝚗 == "𝚛𝚒𝚐𝚑𝚝" 𝚘𝚛 𝚗 == "𝚁𝚒𝚐𝚑𝚝":
      𝚛𝚒𝚐𝚑𝚝𝚜 = 𝟶
      𝚏𝚘𝚛 𝚒 𝚒𝚗 𝚛𝚊𝚗𝚐𝚎 (𝟷):
      𝚛𝚒𝚐𝚑𝚝𝚜 += 𝚒
      𝚗 = 𝚒𝚗𝚙𝚞𝚝("𝚜𝚊𝚍𝚏𝚊𝚌𝚎, 𝚕𝚎𝚏𝚝 𝚘𝚛 𝚛𝚒𝚐𝚑𝚝?")
      𝚗 = 𝚒𝚗𝚙𝚞𝚝('𝚏𝚕𝚒𝚙𝚜 𝚝𝚊𝚋𝚕𝚎𝚜, 𝚕𝚎𝚏𝚝 𝚘𝚛 𝚛𝚒𝚐𝚑𝚝?')
      𝚠𝚑𝚒𝚕𝚎 𝚗 == "𝚛𝚒𝚐𝚑𝚝" 𝚘𝚛 𝚗 == "𝚁𝚒𝚐𝚑𝚝":
      𝚗 = 𝚒𝚗𝚙𝚞𝚝('𝚏𝚕𝚒𝚙𝚜 𝚝𝚊𝚋𝚕𝚎𝚜, 𝚕𝚎𝚏𝚝 𝚘𝚛 𝚛𝚒𝚐𝚑𝚝?')
      𝚙𝚛𝚒𝚗𝚝("\𝚗𝚈𝚘𝚞 𝚐𝚘𝚝 𝚘𝚞𝚝 𝚘𝚏 𝚝𝚑𝚎 𝙻𝚘𝚜𝚝 𝙵𝚘𝚛𝚎𝚜𝚝!\𝚗\𝚘/")

  • @obli8984
    @obli8984 3 роки тому

    the number you mention in parenthesis in for loop doesn't printed on the screen

  • @itsdejinero
    @itsdejinero 4 роки тому +2

    AMAZING LECTURE

  • @aymensekhri2133
    @aymensekhri2133 5 років тому

    Thanks a lot Dr. Anna Bell

  •  4 роки тому

    2:00 Strings

  •  4 роки тому

    13:50 Comparison

  • @ziyaalim2800
    @ziyaalim2800 4 роки тому +2

    how did she comment on multiple lines at once ?? By the way great lecture!!!

    • @eyob_g
      @eyob_g 4 роки тому

      Ctrl + 4

  • @adiflorense1477
    @adiflorense1477 4 роки тому +2

    18:27 So the machine does the job of looking for something, for example, the free food on this video, it's like a human or a baby trying to find a way to reach it.

  • @saimahossain332
    @saimahossain332 4 роки тому

    i have a question, how do you remove the first hashtags in a column with a shortcut?

  • @arshian7670
    @arshian7670 6 років тому

    X = float(input("Choose a value for x: ")
    Y = float(input("choose a value for y: ")
    if (X==Y):
    print("X and Y are equal")
    if y != 0
    print("therefore X / Y is: ", x/y)
    elif (X

    • @abdullahchowdhury9589
      @abdullahchowdhury9589 4 роки тому +1

      You have not closed the first Parenthesis of float casting.

    • @jordanmills4945
      @jordanmills4945 3 роки тому

      Both X and Y need closing parenthesis for float casting also needs a colon after if y != 0 and make sure your variables are uppercase as that is what you named them.

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому

    19:45 if statement

  • @yuminkim7264
    @yuminkim7264 7 років тому +1

    Whenever she shows the python codes on her PC's spyder, how she change from comment to code(vice versa) so quickly by dragging? is there any short cut for that functionality?

    • @Viruz256
      @Viruz256 7 років тому +4

      If you press ctrl+1 in Spyder, all marked code changes to/from comment

    • @CrushOfSiel
      @CrushOfSiel 5 років тому

      @@Viruz256 Thank you! I was looking for this comment/answer!

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому

    1:50 strings objects

  • @bhaveshchaudhari3406
    @bhaveshchaudhari3406 2 роки тому +2

    12:28 Ufff that excitement...😍

  • @acavaelnick
    @acavaelnick 5 років тому

    Hi people, anybody could give me a hand ?
    I'm trying to do the fingers exercises in the textbook for this course, and in chapter 3 there is one that says:
    'Write a program that takes an integer enter by the user and prints two integers, root and pwr, such that 0 < pwr < 6 and root**pwr equals the integer entered by the user. If no such pair of integers exists, print a message saying so.'
    I'm really strugglin with the logic there and would gladly accept some help. Thank you

  • @fernandocortes1187
    @fernandocortes1187 4 роки тому

    3:05 concatenation

  • @HadeelHanaysheh
    @HadeelHanaysheh 7 років тому +1

    on the 40th minute why i has the values 5 7 9 not 5 6 7 8 9 ?????
    please explain !!!

    • @ryankung3244
      @ryankung3244 7 років тому +2

      for range function, the parameters include start, end and steps. steps has default value of 1, therefore without explicitly specifying for the range function, you would get an iterator that output a sequence of values from 5,6,7,8,9,10 if it was range(5,11). However, since step was specified to be 2, each time the iterator will yield and output a new value equal to previous value + 2, which range(5, 11, 2) give you 5, 7, 9. Also since 11 will be greater and equal to 11, so 11 won't be part of the result for the range function.