Lecture 2: Strings, Input/Output, and Branching (old)
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.
what a time to be alive, following MIT lectures from a tiny town in Morocco, preparing to join a computer science school next year.
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).
@@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.
Good luck bro
Nice! It's about time that people get access to good free education regardless of where they spawned into the game.
@@apartmentreef "love: spawned into the game"
Dr. Ana Bell is an mazing Proffessor. I'm loving this classes. Thank you SO much MIT!
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
New to programming and so grateful I live in the day and age where I can supplement my learning with MIT courses. Thank you!
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.
Dr. ana bell is a very impressive mentor
thank you so much professor
I´m new to programming. These lectures are amazing. Thank you MIT.
We extend our heartfelt gratitude to MIT for providing this valuable course. It fulfills our needs perfectly. ❤
You're an outstanding Teacher.
This is a very good first programming class, Danke Schön!
Thanks ! ❤
Good instructor 👩🏫
The 1080p is very nice . Thank You .
WOW gracias por el aporte Dios Bendiga America.-----God bless America
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.
Only for the first week 😏
@@andiuptown1711 You're mistaking hard for elementary.
@RagHelen
Those students wouldn't be taking the introductory course.
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
print(' '.join([verb]*5))
Nice lesson madam ❤
I taught in a community college, very similar course.
Thankyou
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.
GOOD VIDEO😃👍
i am from slum area of india but u made me a believer
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!
hey! same boat. except i got into marketing instead.
I can assure you that this is turning me into an MIT trained computer scientist from impoverished Malawi.
How can I open both input and output shell in python at a time? I am a beginner to learn python. TIS
I am from Pakistan . This is very informative python series
Teaching method is good
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!
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)!
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
@@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?
Hello .u ave used double inverted commas while around something u have used single comma .why plz explain madam .thanx
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?
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.
Good...
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
How many of you affection towards your teacher ❤ 🎉
8:09
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.
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.
Agreed
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.
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.
audio sync issues :(
We doublechecked the audio and the sync is fine. You will need to troubleshoot your computer/phone/tv setup.
@@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.
You are correct! Thanks for the time stamps, that helps us a lot!
Or just relay on your teacher
Here again video 2 April 26 2024
What in the actual fuck did u just say
Writing Looking blur
print(((question+' ')*5).rstrip())