Тёмный

A Random Walk & Monte Carlo Simulation || Python Tutorial || Learn Python Programming 

Socratica
Подписаться 889 тыс.
Просмотров 666 тыс.
50% 1

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 605   
@Socratica
@Socratica 2 года назад
Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica
@VashaLittleMasha
@VashaLittleMasha 7 лет назад
This. Is. Amazing. I never ever saw a tutorial with such a refined artistic taste
@SingingblissofRajat
@SingingblissofRajat 6 лет назад
VashaLittleMasha Code can be used to create art. Try it. It's fascinating.
@vulturebeast
@vulturebeast 5 лет назад
She is an actress , a very great actress that's why :)
@marsrocket
@marsrocket 5 лет назад
@@vulturebeast And a dancer, and a voice artist...and probably more too.
@Socratica
@Socratica 5 лет назад
@@marsrocket And a programmer!! Ulka really is amazing.
@rashayahya
@rashayahya 5 лет назад
I agree
@Socratica
@Socratica 4 года назад
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
@sterlinglozalee9926
@sterlinglozalee9926 4 года назад
Great update on an almost 3 year old video - thanks for the awesome content!
@SagiPolaczek
@SagiPolaczek 4 года назад
Socratica great content!
@ChumX100
@ChumX100 5 лет назад
As for the "even numbers get you closer" thing: Since the direction of the steps is evenly distributed, in the even case, we can expect the number of steps going up to be the same to those going down. But in the odd case, we can expect the number of steps in one direction to be one larger than the other, leading us further away from the origin. The same is true for the left/right dimension. This phenomenon should be less and less noticeable, as we increase the number of steps.
@saraperestrelo8377
@saraperestrelo8377 4 года назад
Yes, but this is only because it was considered the result "distance = abs(x) + abs(y)", removing the influence of the sign of x and y, which can influence your distance in each direction. Interesting.
@chukypedro818
@chukypedro818 4 года назад
Yes., Also this is dependent on the number of blocks chosen, take for instance 5 blocks away from home, We expect the even number to be further aways..
@sebastiandonickler.6715
@sebastiandonickler.6715 3 года назад
I think it is because I’m the second step you have a only a 25% chance to be 2 blocks away and 75% to be one block away or back to the starting point. For example if your first step is W only if the second step is W you will be 2 blocks away, if it is S or N you will be 1 block away and if it is E you will be back at the starting point. So this tendency will impact the subsequent results as more steps are added.
@WillChaseIV
@WillChaseIV 11 месяцев назад
Is it safe to say that with an even number of blocks, there are more chances of backtracking compared to an odd number of blocks?
@pursuitofcat
@pursuitofcat 7 лет назад
"This concludes my gamble amble preamble" hahaha
@saitaro
@saitaro 7 лет назад
She's my coding dominatrix now
@ting-hsiangwang311
@ting-hsiangwang311 7 лет назад
Exactly the vibe I got from her. XDD
@felixsnag9897
@felixsnag9897 6 лет назад
Dont be rude
@CarlosOrtiz-ht6rn
@CarlosOrtiz-ht6rn 6 лет назад
Jeez guys, keep your pants on
@mikefocal5770
@mikefocal5770 6 лет назад
here name?
@thegaminghobo4693
@thegaminghobo4693 6 лет назад
mike focal I can’t tell you exactly where you are but I’m in England🤷🏼‍♂️
@elghs2001
@elghs2001 3 года назад
This channel is INSANE. Thank you for providing such an in-touch way of explaining something as complex as coding in Python.
@hayfordadjavor18
@hayfordadjavor18 7 лет назад
There's absolutely no question about it; Socratica is a winner by every measure! Keep up the excellent work!
@tythedev9582
@tythedev9582 4 года назад
How have I missed this channel?? This tutorial is superb!
@TheSatishPatel
@TheSatishPatel 5 лет назад
Please add videos for basic algorithms also. Videos on this channel are high quality and watching them is absolute satisfying.
@SheepWaveMeByeBye
@SheepWaveMeByeBye 7 лет назад
Great teaching. Love the high-tech style.
@kangjohan78
@kangjohan78 7 лет назад
Did you see her dress?
@PeterManger
@PeterManger 4 года назад
Whenever I need to reset my programming thinking brain - just watch any of Socratica's programming videos!
@Socratica
@Socratica 4 года назад
We love this idea!! Thanks, Peter. 💜🦉
@clydecessna737
@clydecessna737 5 лет назад
"Monte Carlo: A sunny place for shady people". - Somerset Maugham
@peterfarrell66
@peterfarrell66 6 лет назад
Great videos, wonderful sense of humor and quality Python content!
@theexposer9483
@theexposer9483 2 года назад
High class material, reminds me of Morpheus explaining the Matrix. Excellent, to the point and does not waste any time of the listener. Keep the good work.
@GlauberLimaBR
@GlauberLimaBR 4 года назад
Seriously, your Python videos are the best! Many thanks for the time you spent building such a beautiful and well organized material! Top-notch!
@CarloRizzante
@CarloRizzante 7 лет назад
"The city of Monte Carlo... you'll never find a more wretched hive of scum and villany." ...hahaha, pretty well said :-D
@CalifDuDad
@CalifDuDad 6 лет назад
Again....... starwars.wikia.com/wiki/Mos_Eisley
@bigfootpegrande
@bigfootpegrande 6 лет назад
Mos Eisley is not a real Cassino city, Canto Bight is...
@banderilllero
@banderilllero 6 лет назад
what does this mean?
@bigfootpegrande
@bigfootpegrande 6 лет назад
These are jokes on Star Wars ("A New Hope") and The Last Jedi...
@dirkmcnasty8585
@dirkmcnasty8585 5 лет назад
Well played Socratica, very well played. Throwing my kudos on using the Star wars quote as well.
@peterclaassen5865
@peterclaassen5865 3 года назад
The Best Ever Tutorials, entertaining ,CLASSY, always waiting for her deadpan "The city of Monte Carlo... you'll never find a more wretched hive of scum and villany." or the like. And I actually learn a lot. Thanks!
@CarlosOrtiz-ht6rn
@CarlosOrtiz-ht6rn 6 лет назад
Thank you for this explanation of Monte Carlo simulations.
@bryanchambers1964
@bryanchambers1964 6 лет назад
"You will never find a more wretched hive of scum and villainy". Ha ha. That is the greatest sentence in the English language ever.
@Erotemic
@Erotemic 3 года назад
"We will perform the programer's solemn duty to write a docstring." - Preach!
@emmanueltondikatti8754
@emmanueltondikatti8754 3 года назад
As a beginner in programming this took me a bit of time to grasp, but the way you explained was phenomenal. It really boost up my confidence. Thanks for this.!
@Socratica
@Socratica 3 года назад
Thank you so much for telling us - this really gets us excited about making more videos! 💜🦉
@kalied3715
@kalied3715 4 года назад
Wow, this blew my mind. When I increased it to 5 blocks or less, the odd walk has a higher chance of being closer to home.
@cyndicorinne
@cyndicorinne Год назад
I think the reason that random walks with even numbers of steps lies in the trivial cases wherein 0 steps lands you right at home, 1 step definitely won’t end up back home, 2 steps may or may not, and so forth.
@Artonox
@Artonox Год назад
this is the kind of videos i need. Just straight up describe the problem, code in a very highly excellent presentative manner.
@ThePowerchimp
@ThePowerchimp 7 лет назад
The "high-tech virtual girl" delivery in these videos SHOULD be cringe-inducing, but somehow you guys manage to make it fun and engaging!
@syd6358
@syd6358 Год назад
Why it should be cringe
@pungavaD
@pungavaD 7 лет назад
if someone had taught me random walk in this way earlier, I would have been a prodigy by now. thanks for this awesome video. I have already subscribed and believe this video to be more useful for me than previous ones.
@ashketchum7768
@ashketchum7768 6 лет назад
Her way of speaking and her voice remind me of Diana from the game Hitman
@chrislam1341
@chrislam1341 5 лет назад
i found it like metal gear..
@the_emmo
@the_emmo 5 лет назад
I was expecting a "Good luck 47" right at the end of the tutorial lmao
@TheRealWindlePoons
@TheRealWindlePoons 4 года назад
She reminds me of Pree from Red Dwarf
@sandeepn94
@sandeepn94 3 года назад
Not at all!
@bisratgetachew8373
@bisratgetachew8373 3 года назад
Now that you brought that up, I am reminded of Hit man2
@rickall
@rickall 7 лет назад
That description of Monte Carlo. She seems pretty cool AI. The 100.
@macmos1
@macmos1 7 лет назад
To answer @Benjamin Voll, my initial guess is that the odd distances (numbers) are not perfectly divisible by two like even distance(numbers). P.S. Great videos. I like the emphasis on computer science and not just "learning python." Also, great videos on mathematics, too.
@sharpEAGLES
@sharpEAGLES 4 года назад
"...Our release schedule will be less random!" 😂 Atlast! a programmer with good sense of humor. This is really amazing BTW.
@amoorinet..
@amoorinet.. 9 месяцев назад
This lady is not just a programmer, but she is actually a real scientist I have been searching for more than ten years for an efficient and logical way to implement Monte Carlo simulation
@kirill_good_job
@kirill_good_job 7 месяцев назад
Where's Monte Carlo ?
@amoorinet..
@amoorinet.. 7 месяцев назад
I said tool use for ​@@kirill_good_job
@rashayahya
@rashayahya 5 лет назад
This channel became my one of my favorite RU-vid channels
@okunolakehinde5357
@okunolakehinde5357 7 лет назад
I love ..socratica...You guyz are the best online tutors...I want you to give a teaching on PHP programming as well. thanks
@watson494
@watson494 7 лет назад
Fantastic channel, congratulations! I wish a lot of success for you guys.
@rogrp1241
@rogrp1241 5 лет назад
These are the videos I like most about python, do not stop uploading that content please, thank you very much!
@rileynobles7146
@rileynobles7146 6 лет назад
No better way to prove you are a tech geek than to throw in a "Star Wars" Quote. Excellent!
@hv1461
@hv1461 4 года назад
I appreciate all the efforts you put into these videos. And I'm impressed with how supportive the community was for your kickstarter campaign. I wonder if that suggests a new model for how educational content will be developed. I'm also thinking about the aesthetic you've established here and the pedagogical efficacy. I wonder if you've studied whether any increased learning efficiency emerges and it generates a return on your production costs. If so, you might have a scalable business model.
@mahimsd7645
@mahimsd7645 6 лет назад
I walked randomly and found Socratica ...just 0 block from my house
@khonello
@khonello 2 года назад
Oh my gosh this woman is the best python programmer i know so farr
@MinecraftLetstime
@MinecraftLetstime 4 года назад
This is how programming tutorials should be!! Exactly in that voice
@michaelwood2292
@michaelwood2292 7 лет назад
From what I have seen on the Socratica Channel, you have a "WINNER"... Hope you get funding to do great and wonderful things. Thank you for that "gamble" .
@davecain5406
@davecain5406 6 лет назад
Laurel and hardy
@District876
@District876 3 года назад
You are the only one who keeps the ability to make me understand all the difficult problems of the world .You are great ,awesome ..I dont know how to express my respect ,gratitude towards you . Thank you mam ...pls keep uploading more videos on python
@Socratica
@Socratica 3 года назад
Your kind message brought a smile to our faces today! 💜🦉
@District876
@District876 3 года назад
@@Socratica Mam please keep making videos on such topics ,Its a humble request mam .
@ahmadzorjis6263
@ahmadzorjis6263 4 года назад
I fall in love with this channel.
@pinkmolly5660
@pinkmolly5660 5 лет назад
so finally I've found you. this is probably the best tutorial i've ever seen on yt.
@antiquarian1773
@antiquarian1773 3 года назад
This channel is so underrated.
@PewPew_McPewster
@PewPew_McPewster 4 года назад
I wish I watched this video like 5 years ago, the Monte Carlo method is a cornerstone of many important fields of research, but I had felt locked out of it for the longest time because classrooms simply dismissed it as an abstract idea from which we derive a single average value. Whelp, time to jump back into polymer science!
@kristoffersonfox9665
@kristoffersonfox9665 3 года назад
The difference in probability between an even/odd number of moves may be related to the fact that the origin is special: Every move from there increases the distance to the origin with 100% probability. The first move (odd) increases the distance, and if you happen to get back to the origin, this will happen again. You need an even number of moves to get back to the origin, therefore every move from the origin is an odd move. So, odd moves are slightly move "evil". The further you get away from the origin, the less relevant this becomes, therefore the probability difference is reduced with the number of moves.
@OlumideOni
@OlumideOni 6 лет назад
Guys lets support this channel financially as much as possible. They are doing a great job here
@sayanpaul728
@sayanpaul728 5 лет назад
Can you make a full course on Machine Learning and AI from scratch, to advanced with few project, so that a lot of other people will benefited from it. There are also some other video on the said above, but your video is stand alone. I really appreciate you for doing hard work for us. Thank You.
@trying2adult
@trying2adult 7 лет назад
Wow just came across this random video and I love this!
@samelias2947
@samelias2947 Год назад
Hi Socratica, very impressive and that makes it all the more difficult to have a different understanding. 22 seems to be the highest number that you may be able to come back with no transportation. In other words, above that number you will have to pay for transportation. That is not the same as what the problem is asking - which is the highest number that with which you'll end up 4 blocks or less from home. This number seems to be 14. In between those two numbers the probability seems to oscillate up and down, in both runs, but that's a separate observation. I'd appreciate a reply for a sanity check. Thanks
@Glademist
@Glademist 4 года назад
Oh wow i enjoyed this video so much. Very educative and well though out. The female voice is catchy and the background noise actually is not disturbing but sort of stimulating. Awesome.
@TehFingergunz
@TehFingergunz 7 лет назад
fantastic production value!
@reinforcer9000
@reinforcer9000 Год назад
To see if I have an accurate understanding: To get an accurate estimate of the ratio of paths fewer than 4 blocks from home to paths more than 4 blocks from home for a given walk size, you perform Monte Carlo simulation. That ratio is basically a Bernoulli distribution which is the true underlying distribution that we're trying to estimate, unknown to us, for each walk size. What we could do is simply exhaustively generate every permutation of paths for each walk size, and divide by the total to get that distribution. But in higher dimension, the number of permutation blows up, and is intractable to solve. So we do Monte Carlo simulation which is just drawing a large number of samples to approximate the underlying distribution. The more trials we do, the more our estimation converges toward the true value according to the law of large numbers. The problem of longest walk size over 50% is irrelevant. The heart of Monte Carlo simulation is accurate estimation of a probability distribution via efficient random sampling to overcome intractability, right?
@mdrafiqul2898
@mdrafiqul2898 3 года назад
Wow! That's the best monte Carlo simulation tutorial I've ever seen.
@itzhakrasooly9081
@itzhakrasooly9081 3 года назад
It's perhaps worth pointing out that the question is ambiguous. As stated, the question is: "What is the longest random walk you can take so that, on average, you will end up 4 blocks or fewer from home?" When I read this, I thought it concerned the expected (i.e. "average") net distance travelled given random walks of a particular length. That is, I interpreted the question as "What is the longest random walk you can take such that you end up 4 blocks or fewer from home in expectation?" On this interpretation, the answer does not seem to be 22 -- it is (I think!) only 12! Here are my full results: Number of steps = 1 / Expected blocks to home = 1.0 Number of steps = 2 / Expected blocks to home = 1.504775 Number of steps = 3 / Expected blocks to home = 1.87875 Number of steps = 4 / Expected blocks to home = 2.18895 Number of steps = 5 / Expected blocks to home = 2.460925 Number of steps = 6 / Expected blocks to home = 2.7177 Number of steps = 7 / Expected blocks to home = 2.93355 Number of steps = 8 / Expected blocks to home = 3.142575 Number of steps = 9 / Expected blocks to home = 3.341525 Number of steps = 10 / Expected blocks to home = 3.519475 Number of steps = 11 / Expected blocks to home = 3.70665 Number of steps = 12 / Expected blocks to home = 3.87785 Number of steps = 13 / Expected blocks to home = 4.02005 Number of steps = 14 / Expected blocks to home = 4.17785
@reysombi
@reysombi 4 года назад
i really feel into video Game Mass effect when i see Socratica. Great job!!
@sebastiandonickler.6715
@sebastiandonickler.6715 3 года назад
I think it is because I’m the second step you have a only a 25% chance to be 2 blocks away and 75% to be one block away or back to the starting point. For example if your first step is W only if the second step is W you will be 2 blocks away, if it is S or N you will be 1 block away and if it is E you will be back at the starting point. So this tendency will impact the subsequent results as more steps are added.
@rs-tarxvfz
@rs-tarxvfz 2 года назад
Most Intelligent RU-vidr!
@DavidAnderson-dm5kf
@DavidAnderson-dm5kf 2 года назад
the monte carlo comment make me laugh so loud! didnt see it coming. like your style
@peristhiongo9712
@peristhiongo9712 5 лет назад
Socratica, you're amazing. Just believe in that. You've been a great source of knowledge to many I included.
@dylankirk6166
@dylankirk6166 5 лет назад
Gamble amble preamble... you have officially made my day.
@noahbroyles8828
@noahbroyles8828 4 года назад
Gosh that was fascinating! Great video style, good content! (Now I no longer feel guilty for being a Monte Carlo type dude 😉)
@coldarif
@coldarif Год назад
Nice, you guys make it look simple and easy to understand
@GEScott71
@GEScott71 6 лет назад
Thank you for another great tutorial! For the challenge at the end, I get 31 as the answer for the largest random walk which will on average leave me 5 blocks or less from home. That is a slightly different challenge than stated - you said "less than 5 blocks" which i believe is the same as "4 blocks or less"...hence the same as the original question and same answer (22). What did others come up with?
@ersekrem
@ersekrem 5 лет назад
Condition: if distance < 5: Result: Walk size = 22 / % of no transport = 50.839999999999996
@shadowskillz1975
@shadowskillz1975 2 года назад
isnt she the best?? hands up for that explanation
@shanepython
@shanepython 6 лет назад
The stunning beautiful woman initially caught my eye. The straight forward, easy to understand tutorials caused me to subscribe. The humor is a nice added bonus. Oh why we're YOU not my Pascal teacher in the 80's?
@user-lq7lg5jt4k
@user-lq7lg5jt4k 7 лет назад
i love the ambiental electronic bird chirp stuff
@ChumX100
@ChumX100 5 лет назад
I think that the problem statement is not clear. The average length of a 22 block random walk is about 5.28. This is higher than 4. On the other hand, for 12 blocks, the average length is about 3.86. And for 13 blocks, the average is about 4.33. So the longest random walk you can take so that , on average, you end up at at most 4 blocks from the origin ist 12. The soulution of 22 is for a different problem: "What is the longest random walk you can take, so that more than half of the time you end up at at most 4 blocks away from the origin?"
@jimbroomy8207
@jimbroomy8207 5 лет назад
I came to the same conclusion.
@oscarys
@oscarys 4 года назад
Exactly. The question posed and the answer given are unrelated. I agree with you that the answer is 12. Besides that, the tutorial is awesome.
@toothlessinnovations8578
@toothlessinnovations8578 6 лет назад
this channel is the best among others. we need more videos on python.
Год назад
About the even/odd probability, I believe that the even number of steps has a higher chance of getting closer to the origin because even numbers can perfectly cancel the total displacement; It's easy to see if you reduce the dimension of the problem and put it on a line where you can go a positive or negative direction; Let's begin analyzing the 1,2 scenarios with one step you will in the best scenario be at at least one step away of the origin, with 2 steps you can be at 2 or zero steps away; Again with the 3,5,7... you cannot get zero displacements.
@deepakbharti2800
@deepakbharti2800 5 лет назад
Superb video .......I really love scifi movies and watching this video is almost same. Great Job
@febryer1824
@febryer1824 2 года назад
Good Demonstration of the technique, but I have a small restraint on the code! There should be no for loop for the number of blocks n in the second part of the program, and for n=30, the % of the no_transport is ~ 41 for 10,000 experiments.
@MrBlpvivek
@MrBlpvivek 3 года назад
oh man.. I love the narration and the background music. Great !!
@adilsher
@adilsher 4 года назад
These are not just coding tutorials but programming mindset tutorials!
@aldnav
@aldnav 6 лет назад
"Solemn programmer's duty"
@MrRahul15937
@MrRahul15937 4 года назад
😂
@semabkhan
@semabkhan 4 года назад
I dont understand half of the content but I have seen almost all of this series.. Interesting.. I know
@roborebel6031
@roborebel6031 2 года назад
Great video!! I love this series it is both entertaining with the great sense of humor and explains everything in a way that I can understand. Did anybody else get 31 as the answer to the problem at the end of the video?
@conanfortuna4665
@conanfortuna4665 6 лет назад
Simple and a very crisp code example! Thank you!
@NewyJimmy
@NewyJimmy 4 года назад
Haven't seen your channel before but I quite enjoyed this video
@a2dxp168
@a2dxp168 6 лет назад
All examples are very well selected for the topics.
@sergiocortesgodoy
@sergiocortesgodoy 3 года назад
I get 31 steps for prob>50% with 5 steps but skipping some even steps. This is pretty cool, thanks!
@guiray2000
@guiray2000 6 лет назад
She is the best teacher ever!
@sathjayaperera848
@sathjayaperera848 7 лет назад
She's the one!
@lutpulla7183
@lutpulla7183 6 лет назад
You mean singleton?
@prabhashprakash
@prabhashprakash 6 лет назад
Arislan Makhmudov NEO
@Richard_is_cool
@Richard_is_cool 6 лет назад
I read that in David Mitchell's voice and I'm hope I'm not the only one.
@yb801
@yb801 6 лет назад
Neo , Matrix
@quazichimp
@quazichimp 7 лет назад
Well done! as always....with just the right touch of deadpan humor. love it!
@ronimiguel
@ronimiguel 7 лет назад
Thanks again, you guys make it look simple and easy to understand.
@sashwotkoirala3934
@sashwotkoirala3934 4 года назад
So for east its (1,0) because of x increase by one but for the west, its (-1,0). Is it because east and west are lined up in the x-axis.
@iWonderOfficial
@iWonderOfficial 7 лет назад
Thank you for making all those great videos! Amazing style of teaching and also very entertaining
@bahabwa
@bahabwa 4 года назад
This channel makes learning so easy
@karlschmied6218
@karlschmied6218 3 года назад
Monte Python's school of random walking!
@isuryashashank
@isuryashashank 4 года назад
I can relate. It gives a normal programmer the environment of a "programmer in movies". By the way, I learnt a lot. Thanks
@Ptr-NG
@Ptr-NG 5 лет назад
What a delivery! Blessed be...!!
@julienbongars4287
@julienbongars4287 6 лет назад
Awesome series however, could you color code your python codes. When everything is the same colour, it's difficult to see the flow. Thanks!
@rahulraj233
@rahulraj233 5 лет назад
No Errors No Surprises. Thanks.
@alexeykutepov3767
@alexeykutepov3767 7 лет назад
run
@bapis3749
@bapis3749 7 лет назад
I like the way she says "RUN"
@moofymoo
@moofymoo 5 лет назад
what's the point, if you cannot hide.
@billfield8300
@billfield8300 4 года назад
@@moofymoo and besides... I thought we were walking !
@bahabwa
@bahabwa 4 года назад
i almost took off...
@nakulv2761
@nakulv2761 7 лет назад
5:06 was really funny :D
@pradeep422
@pradeep422 6 лет назад
thts sound of racing
@kino.kylo.kin1
@kino.kylo.kin1 6 лет назад
Mois eisley space station :p
@bigfootpegrande
@bigfootpegrande 6 лет назад
They should rename it to Canto Bight Method
@SomeOtherPooma
@SomeOtherPooma 6 лет назад
More accurately: "you will seldom find a /less/ wretched hive of scum and villany..." It's the land of the super rich, also they have sun, and very large boats.
@revlwalter9952
@revlwalter9952 5 месяцев назад
I found the best YT Channel lol
@RicoCordova
@RicoCordova 5 лет назад
Nice intro video, but your code would never pass a linter. ;) For people new to Python (or coding, in general), don't write your methods like this. These are fine for examples, but if you are actually writing a project, you should be more explicit with your variable names. PEP8 is a fantastic guideline for coding style. It's targeting Python, but most of it can be applied generally. I would also recommend following the Zen of Python. You can read it by entering a Python interpreter and run "import this". Run the following in a terminal. python -c "import this" Always run a linter against your code before finishing. There are linters for all languages. A linter simply runs a check against style rules. For instance, if your variable names are correct, or lines are too long, or your inheritance structure isn't correct, etc. It won't check for runtime errors. It only checks for style and clarity. Both of which are important - especially if you work in a team. For Python, I recommend pylint.
@karolyszabo1909
@karolyszabo1909 5 лет назад
meanwhile my code: from random import choice def random_walk3(n): """Return coordinates after 'n' block random walk""" return [sum(x) for x in zip(*(choice([(0, 1), (0, -1), (1, 0), (-1, 0)]) for _ in range(n)))]
@mysticaltech
@mysticaltech 4 года назад
What an awesome sci-fi format, love it! So the MC method as you present it is just a double for loop to run the simulation yes? I had imagined there would be a lot more to it.
Далее
Monte Carlo Simulation
10:06
Просмотров 1,4 млн
6. Monte Carlo Simulation
50:05
Просмотров 2 млн
Coding Was HARD Until I Learned These 5 Things...
8:34
25 nooby Python habits you need to ditch
9:12
Просмотров 1,8 млн
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1,2 млн
How Fast can Python Parse 1 Billion Rows of Data?
16:31