Lec 4 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008

  Рет қаралды 432,445

MIT OpenCourseWare

MIT OpenCourseWare

15 жыл бұрын

Lecture 4: Decomposition and abstraction through functions; introduction to recursion
Instructors: Prof. Eric Grimson, Prof. John Guttag
View the complete course at: ocw.mit.edu/6-00F08
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu

Пікірлер: 213
@kxmode
@kxmode 9 жыл бұрын
Thank you MIT for teaching the world. What an amazing time to live in when people all over the world with Internet Access can virtually go to MIT.
@youmah25
@youmah25 8 жыл бұрын
thank you to all from the professor to the cameramn to who ever edited the video to who ever upload it to who ever made the playlist
@harrykeshramma6112
@harrykeshramma6112 8 жыл бұрын
It's such a wonderful gift MIT is giving to the world of knowledge
@Geebsee
@Geebsee 12 жыл бұрын
Lecture 1: 807 000 views Lecture 2: 190 000 views Lecture 3: 91 000 views Lecture 4: 76 000 views < --- you are here, welcome to the 10% Lecture 5: 48 000 views
@percih70
@percih70 6 жыл бұрын
and a thumbs up for the 0.01% who spotted that the fibonacci seed values are wrong.......
@abhinandandas6466
@abhinandandas6466 5 жыл бұрын
Yeah noticed that... I was about to comment the same
@94D33M
@94D33M 5 жыл бұрын
wow 4th video and already in the 10% imagine the last video ( although sometimes i do see last video also gets a little more views than the middle views ), like seriously, how do the majority watch these courses lol
@cjonwickham1933
@cjonwickham1933 4 жыл бұрын
Lectures ...professor and ta...dean ceo or president of college got richer with bs ripoff....student left 40k in debt no job.
@adiflorense1477
@adiflorense1477 3 жыл бұрын
@@percih70 random.seed(0)
@christianangulo5850
@christianangulo5850 7 жыл бұрын
Mr grimson, thank you for this, and all who provided this knowledge to the public I virtually almost completely finished computer science with MIT so thankful
@geinezhang7030
@geinezhang7030 7 жыл бұрын
can i know how many month u have committed and how many courses u have taken?
@pedrodogg69
@pedrodogg69 12 жыл бұрын
This is such a great thing you guys are doing. Im at my senior capstone and these videos are still showing me things
@adiflorense1477
@adiflorense1477 3 жыл бұрын
This is really what I've been looking for. You are great Mr. Eric, Mr. John
@cerberusrap
@cerberusrap 3 ай бұрын
0:00 Summary of previous lecture 3:00 Decomposition/Abstraction 4:20 Functions 6:20 A boring analogy about "abstraction" by Eric 7:33 Thanks god we are going on the lecture again (Functions) 16:06 Local Bindings 24:24 Using Functions (Farmyard Problem) 33:32 Eric throws somethings to students' heads and thinks it's funneh 😡😡 34:14 Warnings about List and Tuples by John 34:45 Expanding the Farmyard Problem (nested loops) 39:35 Recursion 42:42 Palindrome Function 47:30 Fibonacci Function
@willhdq
@willhdq 9 жыл бұрын
Unfortunately the problem with 'Spiders' will never work, because the inner loop will finish first (with pigs and chickens) and return before the outside loop has a chance to run. This is due to the number of legs of spiders is an exact multiple of pig's (2 pigs = 1 spider). Spiders will always be 0 (or None).
@stupidmonkey246
@stupidmonkey246 13 жыл бұрын
@mazterarius in object oriented programming languages, variables can also refer to objects. in java, for example, the value "null" is assigned to a variable to show that the variable doesnt refer to any object. this is essentially the same as "none". it means that the variable or function is not associated with any value.
@veritasdesigns5067
@veritasdesigns5067 6 жыл бұрын
merry christmas mit, enjoying this a ton :) each time i watch it returns more value. ans. :)
@nigelanicette9243
@nigelanicette9243 2 жыл бұрын
This is the 4th lecture I've heard. It's very interesting that decomposition is the process of breaking down a complex computer problem into a simpler one to fix. I'm doing this to help me get a computer job one day, since I like playing video games.
@NLeyeTin
@NLeyeTin 7 жыл бұрын
Super nerds, athletically tossing candy. Best. Show. Ever.
@stupidmonkey246
@stupidmonkey246 13 жыл бұрын
@mazterarius No, "none" is not a boolean value. Im not sure how you could arrive at this conclusion...there are only two boolean values: "true" and "false". "none" is a special term that indicates that no specific value is being represented. for example, imagine we have "x = none". this essentially makes x a useless value, it specifies that x is not equal to any meaningful value that can be represented by a type (like ints, floats, strings, booleans, etc).
@IamthesilentGyge
@IamthesilentGyge 11 жыл бұрын
I have moved into the problem solving area, I think that will produce the best results. Dont get bored with the tuples,lists,dictionarys cause data manipulation is one of the most important areas of coding. IMHO.
@GalimovBulat
@GalimovBulat 11 жыл бұрын
Cool. Thanks a lot. I have completed udacity cs101 and l'm watching this just for fun. Good stuff and good professor. I'm very enjoy.
@TissDiss
@TissDiss 9 жыл бұрын
How is he typing the code on one screen and running it immediately on the other? Is there something on Python 3.4.3 to do that? If I open a new file and do the code don't I have to import it on the other screen? If I do that, it gets all messed up. Just not sure how he's doing that.
@chethanningappa
@chethanningappa 2 жыл бұрын
this helps me to understand and practice code, GREAT HELP MIT
@dudeonthasopha
@dudeonthasopha 10 жыл бұрын
i feel this is the kind of course where the readings are the biggest help and the lectures are more for clarification. i have an intro book by guttag but they don't have the list of readings :/
@nskpsycho
@nskpsycho 12 жыл бұрын
brilliant professors
@Par5Birdie
@Par5Birdie 13 жыл бұрын
@Channypogosticks I think they are only using Python for demonstration purposes since it's close to writing pseudo code because this is an introduction course. There other courses use a much lower level language.
@BrokenDreamer248
@BrokenDreamer248 7 жыл бұрын
The way this professor says "again" always gets me LOL But regardless, thank you so much for these lectures!
@BacklTrack
@BacklTrack 13 жыл бұрын
@codygman91 "These people saying that python is turing complete therefore anything is possible are missing a rather important thing. Being turing complete means that you can compute every turing-computable function, not that you can do everything in the environment you're running in that's possible. You would have to have special runtime support for python built in to the system to allow that." -- StackOverflow
@brassmonkey9871
@brassmonkey9871 12 жыл бұрын
question i have windows and i cant figure out how he uses two windows, one with the program created and the other activating the typed program using base key words, how do i set up the multi windows?
@rileyvickor9884
@rileyvickor9884 10 жыл бұрын
for all that were curious fib(36) was 24157817
@josenunez8314
@josenunez8314 3 жыл бұрын
44:18 why do you call the function to checkif everything else in the string is a palindrome?
@MrPatrickDayKennedy
@MrPatrickDayKennedy 8 жыл бұрын
Recursive vs iterative... Lotsa good stuff in this lecture to ponder. Great little bit of history with Fibonacci and rabbits (nicely following the counting pigs & chickens functions!) I was suprised only one student knew what a Fibonacci sequence was... Somehow it made me feel old tho that I know what it means to "grok" something. :P Another great lecture MIT!
@robotempire
@robotempire 14 жыл бұрын
I just did the second week's assignment for this course (finding nth prime, product of primes) as a python newb. Whew. Great intro to knocking the cobwebs out about Python.
@1234tomh
@1234tomh 3 жыл бұрын
@26:03 Hopefully the farm is not near the body of water that produced the three-eyed fish from "The Simpsons" LOL Thank you guys very much for making this series of videos public! They are wonderful!
@duartesilva7907
@duartesilva7907 6 жыл бұрын
When printing x, after ans*ans!= x, shouldn't x be a perfect square? Why the professor wrote the contrary? Thank you.
@pc349bds
@pc349bds 11 жыл бұрын
Go to @2:10 to see the correct screen for @22:23
@leonaboson3070
@leonaboson3070 6 жыл бұрын
"no mutant spiders here" - LMFAO this guy is hilarious.
@94D33M
@94D33M 5 жыл бұрын
what ? where ?
@affirmonego5202
@affirmonego5202 4 жыл бұрын
@@94D33M 37:25
@hassaneljebyly4346
@hassaneljebyly4346 4 жыл бұрын
Thank you so much for this.
@DeathadderOne
@DeathadderOne 10 жыл бұрын
i got the barnYard to work in java public class first { public static void main(String[] args) { int numPigs = 0,numChickens = 0,numHeads = 20,totLegs = 56,numLegs = 0; for ( int i = 0; i < 56; i++ ){ System.out.println("chicken check "+numChickens); numPigs=numHeads - numChickens ; numLegs=4*numPigs+2*numChickens; System.out.println(numLegs); numChickens++; if (numLegs==totLegs){ i=56; System.out.println("there are "+numPigs+" pigs and "+numChickens); }}}
@stpdpnd6633
@stpdpnd6633 Жыл бұрын
I have a question. In the spider problem set, how is it gonna find all the solutions that could possibly happen? I thought if we find a solution (we get to the line "solutionfound = true"), is it gonna stop there and print out the answer? Someone help me pls, tks!
@wilhelm.reeves
@wilhelm.reeves 5 жыл бұрын
ahaa! love these lectures
@nicodahbar97
@nicodahbar97 12 жыл бұрын
Why my print wont work? It goes in purple instead of yellow and always says syntax error at the end of a quote?
@biukucanoe
@biukucanoe 13 жыл бұрын
@Faffel You young'ns have it SO easy. Multics had 256k memory for 64 terminals. Dec writers 30 cps, and ;you had to wait 5 sec for the head to move out of the way. JCF Interdata computers were punch card batch jobs, with hand written instructions on which instructions to hand-toggle in to enable paper tape boot. We had to hand in hand-written problem sets, NO WORD PROCESSING. NO EMAIL AUGH.
@labasl
@labasl 14 жыл бұрын
Why professor uses ' instead of " in programs? Is any differences between quotes type used for strings?
@siribuddy
@siribuddy 13 жыл бұрын
The main reason i took to these lecs is to learn python. I know C and Java and have been longing to learn python. I am happy now!!!! Python is a lot easier than C, especially its flexibility. That's probably the reason why we are taught C and Java, so that we find other languages easy!!!!
@ncckdr
@ncckdr 9 жыл бұрын
very nice lectur
@CarlosDutra2
@CarlosDutra2 12 жыл бұрын
They uses the 2.7 version of Python right? I was using the 3.2 and had some problems.
@salzahrah
@salzahrah 14 жыл бұрын
@0121ryanh117 is their a big difference between c++ and java?
@oitio5608
@oitio5608 6 жыл бұрын
What is happening at 09:57 ?
@tarkandikmen8777
@tarkandikmen8777 11 жыл бұрын
Thats because the problem is irrevelant, he is teaching brute force algorithm and how do you use loop in loops. You can see at the next stage he doesn't even care about the accuracy of the result of the problem when he adds spiders to it. Brute force should be the last resort, but its also the easiest one to understand. Thats why he starts from it.
@sleepl
@sleepl 12 жыл бұрын
The Fibonacci program is wrong... You must add to 2nd line "or x == 2"
@kurniasan
@kurniasan 13 жыл бұрын
@Channypogosticks I don't know what makes you think python is useless. But to me, it makes my life easy. I program with python almost everyday.
@edulenciovicente3818
@edulenciovicente3818 9 ай бұрын
Great lesson thank you teach
@QWERTYP5391
@QWERTYP5391 13 жыл бұрын
his jokes may be bad(but at least he has a sense of humor) but it does get you in the right mind frame and provide as excellent examples.
@SpielenwirLP
@SpielenwirLP 8 жыл бұрын
The fibonacci function is wrong. The seed values ar 0 and 1, not 1 and 1. This mistake results in the values being offset by +1. At x=12 the result should be 144. 233 is the result for x=13. The correct function would therefor be: def fib(x): """Return fibonacci of x, where x is a non-negative int""" if x == 0: return 0 elif x == 1: return 1 else: return fib(x-1) + fib(x-2)
@SpielenwirLP
@SpielenwirLP 8 жыл бұрын
SpielenWir A better and way to calculate fibonacci would be this: fibmem = {0:0,1:1} def fib(x): """Return fibonacci of x, where x is a non-negative int""" if not x in fibmem: fibmem[x] = fib(x-1) + fib(x-2) return fibmem[x] This way, values that where already calculated, are saved in the dictionary "fibmem" and won't have to be calculated again. This speeds up the process immensly and even the calculation of fib(500) just takes a split-second. This way it is possible to calculate fibonacci way beyond x=5000 in miliseconds, but you would have to split the calculations into multiple runs of fib(), to work around the "maximum recursion depth"-error. For example if you try fib(1500) you get: "RuntimeError: maximum recursion depth exceeded" But if you run: fib(500) fib(1000) fib(1500) after one another you get the correct end result, which is: 13551125668563101951636936867148408377786010712418497242133543153221487310873528750612259354035717265300373778814347320257699257082356550045349914102924249595997483982228699287527241931811325095099642447621242200209254439920196960465321438498305345893378932585393381539093549479296194800838145996187122583354898000 If you're into that kind of thing, that is...
@SpielenwirLP
@SpielenwirLP 8 жыл бұрын
SpielenWir You could automate the runs of fib(), by spliting x into fractions. For example: u = int(input("Which fibonacci number do you want to calculate? ")) #ask for userinput if u>=500 and u=500 AND 0: #Until this loop repeated 10 times z=z+y #add a 10th of the user input to z fib(z) #and run it through fib() count=count-1 #Offset the counter by -1 print(fib(u)) #Until it has reached 0 and output the fibonacci the user entered elif u>=9000: #This is the same as above, y=int(u/100) #but it splits the input into 100 fractions count=100 #for values above 9000. z=0 while count > 0: #You could repeat this for even higher values z=z+y #Split into 1000 fractions for values below 90000 for example fib(z) count=count-1 print(fib(u)) else: print(fib(u)) #If the value is below 500 it is not necessary to split it, so we just output fib(u) You should refrain from splitting the value to if it's not necessary though, because multiple runs of fib() take longer to calculate. If you would split the calculation for fib(9000) into 1000, instead of 100, the time it takes to calculate increases noticably. I could calculate up to fib(207000), with python using almost exactly 2GB of RAM to store this number. It took about 22 seconds. This is where the calculating-fun ends for me though, because I have the 32-bit version of Python installed.
@ashennell
@ashennell 8 жыл бұрын
+SpielenWir Both 0 and 1 are valid as inital values of the fibonacci sequence.
@percih70
@percih70 6 жыл бұрын
thank you
@sonicjohnson
@sonicjohnson 13 жыл бұрын
Question regarding the palindrome function: def isPalindrome(s): if len(s)
@ashutoshpuri4967
@ashutoshpuri4967 2 жыл бұрын
-1 is taking the last place in the new tuple
@IgorBeneli1014
@IgorBeneli1014 3 жыл бұрын
I can't understand what he did to unindent the print in palindrome exercise.
@keng6394
@keng6394 7 жыл бұрын
what ide is being used, pls ?
@senseofhumerus
@senseofhumerus 12 жыл бұрын
recursion at 39:33
@user-rg6qw2mi1d
@user-rg6qw2mi1d 5 жыл бұрын
I was going along fine but this lecture tripped me up. Pigs and Chickens--how hard could that be?-- well, I don't get it. could someone explain how and why this code was structured? and/or do I need to understand these mechanics to move forward?...
@viwemfaku
@viwemfaku 11 жыл бұрын
What programme is this Prof. using on his Mac.
@Brockstar113
@Brockstar113 11 жыл бұрын
Does anyone know if he's an old-time LISP hacker?
@yahoo1o1
@yahoo1o1 12 жыл бұрын
love the vids. great teacher. my only prob is im finding it very hard to follow the actual computer programming because its very hard to see the screen. still, 10/10
@pabos95
@pabos95 9 жыл бұрын
In the sqrt(x) function what does the != means?
@07Sudarshan
@07Sudarshan 7 жыл бұрын
not equal to
@andypianoman2732
@andypianoman2732 7 жыл бұрын
import string from random import * characters = string.ascii_letters+string.digits password = "".join(choice(characters) for x in range(randint(8,10))) myFile = open("password.txt","w") myFile.write(password) myFile.close() print(password) the code above will create an 8-10 digit password, and create a word doc with it on (paste code into python gui)
@adiflorense1477
@adiflorense1477 3 жыл бұрын
26:02 Sir, how do we get the equation 4 * numpig + 2 * numchicken = 56 from the previous equation?
@lemn1sk856
@lemn1sk856 3 жыл бұрын
It's not from the previous equation (They are 2 different linear equations) The first equation is for the total number of heads (both pigs and chickens have one). The second equation is for the total number of legs, since chickens have 2 and pigs have 4.
@thegettokidZz
@thegettokidZz 2 жыл бұрын
so we have 20 heads total ~ h we have 56 legs total ~ totalLegs we have some chickens, and some pigs ~c, p h = c + p total number of heads = chickens + pigs (because each have 1 head) totalLegs = (2 * c) + (4 * p) total legs = chickens * 2 + pigs * 2 (because chickens have 2 legs and pigs have 4) the number of heads, 20 and the number of legs, 56 are arbitrary values given or passed into the equation. They could be anything, but the equations themselves will remain constant regardless of those numbers.
@bryanjensen5357
@bryanjensen5357 4 жыл бұрын
Interpreter is it's own p versus np?
@ammarali247
@ammarali247 7 жыл бұрын
If anyone else is wondering how to apply the farm problem in C++: #include using namespace std; main() { int Heads = 20; int Legs = 56; int Chickens; int SumLegs; for(int Spiders = 0;Spiders
@IamthesilentGyge
@IamthesilentGyge 11 жыл бұрын
I read somewhere that only 1 out of every two hundred computer science majors still dont understand programing
@ScarredTemple
@ScarredTemple 13 жыл бұрын
Does anyone use the Visual Logic program?
@user-kz8dz3bv3p
@user-kz8dz3bv3p 7 жыл бұрын
where can i get the answer of assignment?? i want to know the answer of ASSN3
@mitocw
@mitocw 7 жыл бұрын
If there are no solutions included on the OCW site, then, unfortunately, they are not available to OCW users. In some cases, solutions to homework assignments, quizzes, and exams are only discussed and presented in the classroom, and not made available in print or electronic format to the MIT students - or to the worldwide community of visitors to the OCW website. In other cases, the instructors plan to re-use in their MIT classroom the assignments, quizzes, and exams, and so they do not wish to widely publish their solutions.
@mackler
@mackler 12 жыл бұрын
Back in my day we didn't have all these fancy windows and mice pointers. We progammed in ones and zeros, and sometimes we didn't even have ones.
@voyagers5026
@voyagers5026 2 жыл бұрын
it's great how the vedio is 10 years old and then here your are even older and telling us things
@atrislugubria965
@atrislugubria965 2 жыл бұрын
how to restart ? 50:41
@lamsmi2345
@lamsmi2345 4 жыл бұрын
Who’s here in 2020?
@LateNightPerson
@LateNightPerson 3 жыл бұрын
Me!
@nutsberserk1
@nutsberserk1 3 жыл бұрын
clearly you
@AlexWillisson
@AlexWillisson 14 жыл бұрын
It's Python, either can be used. Generally personal preference.
@msven
@msven 11 жыл бұрын
I've been watching it on my Roku until now...finally I'm counted within the 10%
@killtomorrow123
@killtomorrow123 7 жыл бұрын
I think i'm gonna have to watch this one multiple times
@codygman91
@codygman91 13 жыл бұрын
@Channypogosticks Python useless? Haven't you been listening to the lectures? You can program anything in a turing complete language. Python is turing complete and more.
@jaydmatacarita
@jaydmatacarita 2 жыл бұрын
39:25 recursion
@forsakenmythos
@forsakenmythos 4 жыл бұрын
I get that he was using it to teach a concept, but wouldn't it be easier to use something like this to check if it's a palindrome? word = input() if word == word[::-1] : print("Word is a palindrome") else: print("Word is not a palindrome")
@thegettokidZz
@thegettokidZz 2 жыл бұрын
maybe it's because he didn't go over the process of steps when using slices. it's a process we haven't learned yet in this course and there's probably a reason he didn't mention it at this point in his lectures. Why don't you go teach at MIT smartass?
@manojuniversity8044
@manojuniversity8044 4 жыл бұрын
I just say thank you
@phatsk8r420
@phatsk8r420 13 жыл бұрын
I can see now the difference between an MIT student and someone who ISNT an MIT student... What takes me months (or I should say about a month) to catch on to something takes them weeks. Interesting... If only I grew up with a little bit more discipline.
@loko95ftp
@loko95ftp 13 жыл бұрын
why does he keep saying ''squirt'' i thought it was ""square"
@Faffel
@Faffel 13 жыл бұрын
@biukucanoe You sound like a nerdy version of Grandpa Simpson, senor. These Opencourse lectures are great. Thanks MIT...
@joshabernathy972
@joshabernathy972 10 жыл бұрын
I have a problem. I wrote the solve function completely correctly, exactly like he did, but I keep getting values of [None, None] returned so the barnYard function always comes back with 'There is no solution'. I have everything done completely correctly just like he has it and I'm using 2.7. Why is this happening? Edit: If go into the solve function and I take the "return[None, None]" and delete it all together, it works, but I still don't fully understand why. I feel like even though the if statement still tells it to return values for the numPigs and numChicks if it finds a solution, the function is still going to return [None, None] anyway after it goes through the entire range and ends the loop. So I have two questions. What is the point of this? and why does this example work for him and not me? If somebody could help that would be awesome. Thanks in advance.
@Drewzdev
@Drewzdev 10 жыл бұрын
32:39 and he actually says "What is the point of this?" 50:39 rhetorically at the end.
@collin.wesley
@collin.wesley 10 жыл бұрын
1. The point of including return(None,None) in this particular example is to weed out inputs that aren't possible. For example, if you were to input 16 heads and 100 legs, this is impossible due to the fact that even if the animal with the most legs, the pig, were to take up all 16 heads, the number of legs would only amount to 64(less than the given total of legs). Thus it would return (None,None) which then results in "There is no solution" printing to the user. 2. I had the same problem you had at first, however I realized that it was a result of a misplaced indentation. Here is my first code: def solve(numLegs, numHeads): for numChicks in range(0,numHeads+1): numPigs=numHeads-numChicks totLegs=4*numPigs+2*numChicks if totLegs==numLegs: return(numPigs, numChicks) return(None,None) Here is my successful code: def solve(numLegs, numHeads): for numChicks in range(0,numHeads+1): numPigs=numHeads-numChicks totLegs=4*numPigs+2*numChicks if totLegs==numLegs: return(numPigs, numChicks) return(None,None) As you can see, my first code had an extra indentation before return(None,None) due to the interpreter's automatic indentation feature I was using to write the code. Because of this, I would check to make sure you do not have this same indentation. The reason my first code doesn't work but my other code does is because python is a language that renders one line at a time going top to bottom. So, when the return(None,None) command is in the location from my first code, the compiler renders the entire block of code which results in it producing "(None,None)" almost 100% of the time. However, when the indentation problem is fixed, the compiler reads everything up to return(numPigs, numChicks) and if something is indeed returned, it skips the last return statement and moves on to the barnYard() function. -Hope I helped anyone who's confused!
@salihsenses6153
@salihsenses6153 6 жыл бұрын
CollinSpeight you saved my day
@clewstah
@clewstah 5 жыл бұрын
I too have read this book. I too, grok, mister martian.
@anubismva
@anubismva 11 жыл бұрын
I've the same question. When you know the answer, tell it, please.
@viksra
@viksra 12 жыл бұрын
48:00 Professor asks "Anybody know what a fibonacci number is?" and girl in front row, right side, puts her hand up but then quickly realizes he's going to call on someone so instead she decides to pretend as if she's running her hand through her hair and then when he looks the other way and calls on someone else, she continues putting her hand up.
@Daim0th
@Daim0th 13 жыл бұрын
I think python gets shit because some consider it a learning language, not a practical language. Creating a language that stresses readability is naturally going to receive that designation, however.
@unrevealedskill
@unrevealedskill 11 жыл бұрын
Im here, and I hardly understand how most of what he says or shows. Hopefully it gets easier to understand.
@pradeenkrishnag2368
@pradeenkrishnag2368 Жыл бұрын
The barnyard and recursions are difficult to understand for a begginner.
@Squabbles47
@Squabbles47 12 жыл бұрын
holy shit class 4 and at functions?!
@AndresGomez-pw4fs
@AndresGomez-pw4fs 3 жыл бұрын
great way, but the Fibonacci number is not accurate, it computed the Fibonacci of 13 instead 1, this because the Fib of 0 not 1. However, the idea of recursion is clear, Thanks.
@1346661
@1346661 12 жыл бұрын
Watch out, we got a badass over here @ThePrivateJoker
@brassmonkey9871
@brassmonkey9871 12 жыл бұрын
@Geebsee this class is easy.. no supriszing 90% drop out
@Polofiesta12
@Polofiesta12 13 жыл бұрын
@Juefawn != it means if its not equal.
@footage6402
@footage6402 4 жыл бұрын
at 26:00 funny how only at MIT would they think that's a grammar school problem. I learned how to do that in the 9th grade lmao
@thegettokidZz
@thegettokidZz 2 жыл бұрын
grammar school?
@percih70
@percih70 6 жыл бұрын
V good but needs a health warning "course based on Python 2.5.4" as a beginner trying to follow along in Python 3.6 will stumble. Update: this course is also available for Python 3.5, see the link in the reply below, its 720p, excellent...
@mitocw
@mitocw 6 жыл бұрын
You should checkout 6.0001, it's an updated version using Python 3.5: ocw.mit.edu/6-0001F16.
@percih70
@percih70 6 жыл бұрын
Thank you
@gamersgene
@gamersgene 13 жыл бұрын
@Channypogosticks no. it's named after a snake.
@vegetablecracker
@vegetablecracker 11 жыл бұрын
I downloaded the whole lot 20+ vids onto iTunes from iTunes University. Very convenient, and all still free. On iTunes University you can search by course name and all the vids are there for you to download.
@Nohshing
@Nohshing 12 жыл бұрын
just check on ocw.mit.edu
@davidadrmd4636
@davidadrmd4636 4 жыл бұрын
9:28, "In this case, squirt,..." ........wait, what? LOL I'm taking notes, and enjoying this a lot. ty for the great vids
@igorseveric310
@igorseveric310 4 жыл бұрын
davidadrm D I am doing the same thing here! 😁
@880330145789
@880330145789 13 жыл бұрын
@biukucanoe yea we do... java has become so convenient
@biukucanoe
@biukucanoe 13 жыл бұрын
Python?? I've never used python ever. I joked that MIT in 1976 did it's darndest to never actually teach you anything that was actually useful. Back then 6.031 was ALGOL and LISP (which damaged 2 generations of programmers) as opposed to the 3 most popular languages at the time, BASIC, FORTRAN and COBOL. However ALGOL + CLU pretty much covered anything you need to do up to C# version 3.5 (at which time they added a bunch of crazy stuff like lambda expressions) and LISP for other wierd languages.
@ThePwnTheory
@ThePwnTheory 13 жыл бұрын
@loko95ftp i think he means Square root when he says that
Lec 5 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
44:13
Lecture 1: Course Overview + The Shell (2020)
48:17
Missing Semester
Рет қаралды 711 М.
CAN YOU HELP ME? (ROAD TO 100 MLN!) #shorts
00:26
PANDA BOI
Рет қаралды 36 МЛН
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 124 МЛН
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 39 МЛН
10. Understanding Program Efficiency, Part 1
51:26
MIT OpenCourseWare
Рет қаралды 231 М.
Leslie Lamport: Thinking Above the Code
59:50
Microsoft Research
Рет қаралды 361 М.
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
6. Monte Carlo Simulation
50:05
MIT OpenCourseWare
Рет қаралды 2 МЛН
We Built the Internet in Minecraft
25:18
Branzy
Рет қаралды 2,1 МЛН
Lec 3 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008
51:00
4. Factorization into A = LU
48:05
MIT OpenCourseWare
Рет қаралды 678 М.
CAN YOU HELP ME? (ROAD TO 100 MLN!) #shorts
00:26
PANDA BOI
Рет қаралды 36 МЛН