Lecture 2: Strings, Input/Output, and Branching (old)

Sdílet
Vložit
  • čas přidán 10. 04. 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...
    CZcams 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 CZcams 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.

Komentáře • 63

  • @fouadmajidi2568
    @fouadmajidi2568 Před 2 měsíci +37

    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 Před měsícem +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 Před měsícem

      @@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 Před měsícem

      Good luck bro

    • @apartmentreef
      @apartmentreef Před měsícem +1

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

    • @OmarTravelAdventures
      @OmarTravelAdventures Před měsícem

      @@apartmentreef "love: spawned into the game"

  • @cloey_b
    @cloey_b Před měsícem +9

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

  • @tmo314
    @tmo314 Před měsícem +6

    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

  • @benhernandez9571
    @benhernandez9571 Před 2 měsíci +5

    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 Před měsícem +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.

  • @user-ug9hh9dt1o
    @user-ug9hh9dt1o Před měsícem +3

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

  • @diveintoengineering6089
    @diveintoengineering6089 Před 2 měsíci +2

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

  • @mdryan8
    @mdryan8 Před 2 měsíci +2

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

  • @mikediaz9033
    @mikediaz9033 Před 2 dny

    You're an outstanding Teacher.

  • @Jndstudiofan
    @Jndstudiofan Před měsícem

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

  • @KoamiviKELEDOME-wr2ys
    @KoamiviKELEDOME-wr2ys Před 2 měsíci

    Thanks ! ❤

  • @gerardtavares45
    @gerardtavares45 Před 2 měsíci +1

    Good instructor 👩‍🏫

  • @brucefrizzell4221
    @brucefrizzell4221 Před měsícem

    The 1080p is very nice . Thank You .

  • @bit-oliver
    @bit-oliver Před měsícem

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

  • @RagHelen
    @RagHelen Před 2 měsíci +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 Před měsícem +2

      Only for the first week 😏

    • @RagHelen
      @RagHelen Před měsícem

      @@andiuptown1711 You're mistaking hard for elementary.

    • @Petticca
      @Petticca Před 13 dny

      @RagHelen
      Those students wouldn't be taking the introductory course.

  • @TheDoc-Worker
    @TheDoc-Worker Před 26 dny +1

    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 CZcams, just as the founding fathers intended

  • @tylermfdurden
    @tylermfdurden Před 2 měsíci +2

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

  • @lenicamini1446
    @lenicamini1446 Před 2 měsíci

    Nice lesson madam ❤

  • @alb12345672
    @alb12345672 Před měsícem

    I taught in a community college, very similar course.

  • @mikediaz9033
    @mikediaz9033 Před 2 dny

    Thankyou

  • @Paradoxonium990
    @Paradoxonium990 Před měsícem

    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.

  • @carsonjamesiv2512
    @carsonjamesiv2512 Před měsícem

    GOOD VIDEO😃👍

  • @alokprakhar
    @alokprakhar Před měsícem

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

  • @joeberry1468
    @joeberry1468 Před měsícem

    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 Před měsícem

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

  • @stanfordmuyila
    @stanfordmuyila Před 20 dny

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

  • @swapankumarjana5046
    @swapankumarjana5046 Před 14 dny

    How can I open both input and output shell in python at a time? I am a beginner to learn python. TIS

  • @Qasimyousaf-zw5kw
    @Qasimyousaf-zw5kw Před měsícem

    I am from Pakistan . This is very informative python series

  • @khudaijakousar8930
    @khudaijakousar8930 Před měsícem

    Teaching method is good

  • @weishanlei8682
    @weishanlei8682 Před měsícem +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 Před měsícem

      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 Před 27 dny

      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 Před 27 dny

      @@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?

  • @muhammadnawab3959
    @muhammadnawab3959 Před 22 dny

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

  • @herbertsusmann986
    @herbertsusmann986 Před měsícem

    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 Před měsícem

      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.

  • @deepurangarajan8696
    @deepurangarajan8696 Před 14 dny

    Good...

  • @yuramushi
    @yuramushi Před měsícem

    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

  • @badrakhariunchimeg1031
    @badrakhariunchimeg1031 Před 2 měsíci +2

    How many of you affection towards your teacher ❤ 🎉

  • @letsgoo4881
    @letsgoo4881 Před 21 dnem

    8:09

  • @pjm3005
    @pjm3005 Před měsícem

    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.

  • @TenguSteel
    @TenguSteel Před měsícem +10

    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 Před měsícem

      Agreed

    • @westnash
      @westnash Před měsícem

      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 Před měsícem

      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.

  • @lonely_astronaut_
    @lonely_astronaut_ Před měsícem

    audio sync issues :(

    • @mitocw
      @mitocw  Před měsícem

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

    • @n4mlss
      @n4mlss Před měsícem

      @@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  Před měsícem

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

  • @badrakhariunchimeg1031
    @badrakhariunchimeg1031 Před 2 měsíci

    Or just relay on your teacher

  • @Figiliev
    @Figiliev Před měsícem

    Here again video 2 April 26 2024

  • @user-ye7ej9js6u
    @user-ye7ej9js6u Před 2 měsíci

    What in the actual fuck did u just say

  • @khudaijakousar8930
    @khudaijakousar8930 Před měsícem

    Writing Looking blur

  • @trideepsaha2594
    @trideepsaha2594 Před 2 měsíci +3

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