Lecture 2: Strings, Input/Output, and Branching

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 เม.ย. 2024
  • MIT 6.100L Introduction to CS and Programming using Python, Fall 2022
    Instructor: Ana Bell
    View the complete course: ocw.mit.edu/courses/6-100l-in...
    TH-cam Playlist: • MIT 6.100L Introductio...
    This lecture discusses the core elements of programs: strings, input/output, f-strings, operators, branching, and indentation. Big idea: Debug early, debug often. Write a little and test a little. Don’t write a complete program at once. It introduces too many errors. Use the Python Tutor to step through code when you see something unexpected!
    License: Creative Commons BY-NC-SA
    More information at ocw.mit.edu/terms
    More courses at ocw.mit.edu
    Support OCW at ow.ly/a1If50zVRlQ
    We encourage constructive comments and discussion on OCW’s TH-cam and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at ocw.mit.edu/comments.

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

  • @fouadmajidi2568
    @fouadmajidi2568 หลายเดือนก่อน +30

    what a time to be alive, following MIT lectures from a tiny town in Morocco, preparing to join a computer science school next year.

    • @OmarTravelAdventures
      @OmarTravelAdventures หลายเดือนก่อน +2

      I agree my dear Fouad...we have achieved so much...yet humans are still fighting over myths that are thousands of years old. I am looking forward to the day we are replaced by non-biological entities or just become mathematical abstractions in a perpetual computing machine (smile).

    • @fouadmajidi2568
      @fouadmajidi2568 หลายเดือนก่อน

      @@OmarTravelAdventures comme disent les français pour quoi pas, perhaps one day humanity makes a big leap in morality and rationality as we did in natural sciences and technology. Glad to communicate with you, Mr Omar.

    • @kenydemeza
      @kenydemeza หลายเดือนก่อน

      Good luck bro

    • @apartmentreef
      @apartmentreef 17 วันที่ผ่านมา +1

      Nice! It's about time that people get access to good free education regardless of where they spawned into the game.

    • @OmarTravelAdventures
      @OmarTravelAdventures 17 วันที่ผ่านมา

      @@apartmentreef "love: spawned into the game"

  • @tmo314
    @tmo314 20 วันที่ผ่านมา +4

    Chapters:
    00:00 - Recap
    04:48 - Strings
    13:12 - Slicing
    29:26 - Input/Output
    39:39 - Practice
    46:58 - F Strings
    50:18 - Booleans
    1:02:29 - Branching

  • @cloey_b
    @cloey_b หลายเดือนก่อน +8

    Dr. Ana Bell is an mazing Proffessor. I'm loving this classes. Thank you SO much MIT!

  • @user-ug9hh9dt1o
    @user-ug9hh9dt1o 29 วันที่ผ่านมา +3

    Dr. ana bell is a very impressive mentor
    thank you so much professor

  • @benhernandez9571
    @benhernandez9571 หลายเดือนก่อน +4

    New to programming and so grateful I live in the day and age where I can supplement my learning with MIT courses. Thank you!

  • @AnomalousWord
    @AnomalousWord หลายเดือนก่อน +1

    Great job Ana! Coming from a family of teachers I appreciate your teaching style and ability to make each point clear with useful examples. I am going back to college (after 20 years of running a business) and I feel like I will be ready to understand the basics of programming from studying this series of videos. Well done. Thank you so much.

  • @diveintoengineering6089
    @diveintoengineering6089 หลายเดือนก่อน +2

    I´m new to programming. These lectures are amazing. Thank you MIT.

  • @mdryan8
    @mdryan8 หลายเดือนก่อน +2

    We extend our heartfelt gratitude to MIT for providing this valuable course. It fulfills our needs perfectly. ❤

  • @stanfordmuyila
    @stanfordmuyila 2 วันที่ผ่านมา

    I can assure you that this is turning me into an MIT trained computer scientist from impoverished Malawi.

  • @RagHelen
    @RagHelen หลายเดือนก่อน +5

    When highschool seniors apply for the MIT in Hollywood movies, they always do the craziest stuff with programming. Only to learn string concatenation in Python after they have been accepted.

    • @andiuptown1711
      @andiuptown1711 หลายเดือนก่อน +2

      Only for the first week 😏

    • @RagHelen
      @RagHelen หลายเดือนก่อน

      @@andiuptown1711 You're mistaking hard for elementary.

  • @gerardtavares45
    @gerardtavares45 หลายเดือนก่อน +1

    Good instructor 👩‍🏫

  • @Jndstudiofan
    @Jndstudiofan 13 วันที่ผ่านมา

    This is a very good first programming class, Danke Schön!

  • @brucefrizzell4221
    @brucefrizzell4221 15 วันที่ผ่านมา

    The 1080p is very nice . Thank You .

  • @bit-oliver
    @bit-oliver หลายเดือนก่อน

    WOW gracias por el aporte Dios Bendiga America.-----God bless America

  • @joeberry1468
    @joeberry1468 17 วันที่ผ่านมา

    Computer science was my first major but life took a turn and I became a nurse. After 15 years, I still want to get my degree in CS. These videos are cool, the teacher is great!

    • @chuck_dane
      @chuck_dane 12 วันที่ผ่านมา

      hey! same boat. except i got into marketing instead.

  • @lenicamini1446
    @lenicamini1446 หลายเดือนก่อน

    Nice lesson madam ❤

  • @KoamiviKELEDOME-wr2ys
    @KoamiviKELEDOME-wr2ys หลายเดือนก่อน

    Thanks ! ❤

  • @Qasimyousaf-zw5kw
    @Qasimyousaf-zw5kw หลายเดือนก่อน

    I am from Pakistan . This is very informative python series

  • @carsonjamesiv2512
    @carsonjamesiv2512 หลายเดือนก่อน

    GOOD VIDEO😃👍

  • @khudaijakousar8930
    @khudaijakousar8930 23 วันที่ผ่านมา

    Teaching method is good

  • @tylermfdurden
    @tylermfdurden หลายเดือนก่อน +2

    print(' '.join([verb]*5))

  • @alb12345672
    @alb12345672 หลายเดือนก่อน

    I taught in a community college, very similar course.

  • @TheDoc-Worker
    @TheDoc-Worker 7 วันที่ผ่านมา

    FYI, I'm recording all the readings for this course over on my channel--I show the text on screen as I read it aloud. Once I'm done with that playlist, you'll technically be able to absorb all material for this course without ever leaving TH-cam, just as the founding fathers intended

  • @alokprakhar
    @alokprakhar หลายเดือนก่อน

    i am from slum area of india but u made me a believer

  • @Paradoxonium990
    @Paradoxonium990 16 วันที่ผ่านมา

    The lecture is good, but I wasn't able to do the problems in the PS1 by watching this lecture and going through the recommended textbook recommended by the course (till section 2.4). I had to watch lecture 3 and go through loops section of the textbook.

  • @muhammadnawab3959
    @muhammadnawab3959 4 วันที่ผ่านมา

    Hello .u ave used double inverted commas while around something u have used single comma .why plz explain madam .thanx

  • @badrakhariunchimeg1031
    @badrakhariunchimeg1031 หลายเดือนก่อน +2

    How many of you affection towards your teacher ❤ 🎉

  • @weishanlei8682
    @weishanlei8682 หลายเดือนก่อน +1

    Does it still make sense for learning particular coding skills at the current era of ChatGPT? We can use plugins in ChatGPT Plus, for example, python, code copilot, data analyst, etc., that help us program with only plain language. Perhaps there is some weakness for the AI generated codes? Maybe we need to dig deeper into the theoretical parts of programming!

    • @ascoolasariv6969
      @ascoolasariv6969 หลายเดือนก่อน

      AI still generates faulty & improper codes. I have also just started learning Python. My software engineer friend told me in simple words that AI cant just make a whole program. It can help you generate certain codes which will increase your productivity and save a lot of time! But you still have to proof-read the code and correct it! So, basically you need to know the language (till now)!

    • @ellyakello326
      @ellyakello326 9 วันที่ผ่านมา

      How do you think chatgpt came to be? It didn't code itself. Principles matter, otherwise you'll be the robot you're trying to create

    • @weishanlei8682
      @weishanlei8682 9 วันที่ผ่านมา

      @@ellyakello326 I disagree the opinion. For example, I don't think you understand how to calculate sqrt(2) by hand. You only calculate sqrt (2) by a calculator. Does it make you like a calculator robot by doing this?

  • @TenguSteel
    @TenguSteel หลายเดือนก่อน +9

    The video too often focuses on the teacher. In class I would be focusing on the projected material, not the teacher. It's really annoying that the camera follows the teacher. Often, even when she is pointing at the screen, the part of the screen she points at cannot be seen or isn't in focus. It would improve the course by an order of magnitude if you fixed this.

    • @frankstudent
      @frankstudent หลายเดือนก่อน

      Agreed

    • @westnash
      @westnash หลายเดือนก่อน

      Totally agree and this is a common problem on YT that makes it much less useful for learning than it could be. If the presenter is to be the focus, then the material should be included in notes to the video that we can access and copy or a link provided to them on the web.

    • @MoJoeShoMo
      @MoJoeShoMo 16 วันที่ผ่านมา

      This isn't rocket science. This is the very basic stuff. Once you have a debugger, a book on the language, it's all self teaching. In no time this just becomes understood and you're more concerned with what you use programming to accomplish.

  • @yuramushi
    @yuramushi 16 วันที่ผ่านมา

    I dont know why but i somehow figured out that if I typed in the text editor while the try it out portion was paused
    text=input("I can _ better than you! ")
    question=("I can run better than you!")
    print(question,text*5)
    it will print out the question but obviously i forgot that i could use quotation marks to add a space so i used an '_' to add the missing verb
    this lecture is awesome

  • @herbertsusmann986
    @herbertsusmann986 หลายเดือนก่อน

    I am trying to figure out what Ana's accent is? I am waffling between Canadian (but that is not quite correct) or some other language she spoke when very young then learned English? (but that may not be quite right either). Does anyone have any guesses?

    • @herbertsusmann986
      @herbertsusmann986 หลายเดือนก่อน

      After further thought I am zeroing in on a west coast Canadian accent. She doesnt seem to have the eastern "aboot" accent but I think in western Canada they dont have that pronunciation.

  • @pjm3005
    @pjm3005 26 วันที่ผ่านมา

    just like in my college class, the teacher harps and harps about good variable names and then, inevitably, every piece of example code consists of utterly trash variable names. At 5:38, would it kill you to rename a and z to personOne and personTwo or some such? Same with b, c and d. I'm ok with silly.

  • @letsgoo4881
    @letsgoo4881 3 วันที่ผ่านมา

    8:09

  • @lonely_astronaut_
    @lonely_astronaut_ 20 วันที่ผ่านมา

    audio sync issues :(

    • @mitocw
      @mitocw  19 วันที่ผ่านมา

      We doublechecked the audio and the sync is fine. You will need to troubleshoot your computer/phone/tv setup.

    • @n4mlss
      @n4mlss 14 วันที่ผ่านมา

      @@mitocw It starts at 24:10 and ends at 41:05. Video and audio is out of sync, but it's not a big deal.

    • @mitocw
      @mitocw  12 วันที่ผ่านมา

      You are correct! Thanks for the time stamps, that helps us a lot!

  • @badrakhariunchimeg1031
    @badrakhariunchimeg1031 หลายเดือนก่อน

    Or just relay on your teacher

  • @Figiliev
    @Figiliev หลายเดือนก่อน

    Here again video 2 April 26 2024

  • @user-ye7ej9js6u
    @user-ye7ej9js6u หลายเดือนก่อน

    What in the actual fuck did u just say

  • @khudaijakousar8930
    @khudaijakousar8930 23 วันที่ผ่านมา

    Writing Looking blur

  • @trideepsaha2594
    @trideepsaha2594 หลายเดือนก่อน +2

    print(((question+' ')*5).rstrip())