every time I want to learn the important parts of a module without having to read its documentation, I come straight to your page. You do an incredible job Corey.. Thank you!
man, I am a starter programmer, of course, python, you teach and explain so well!!! my teacher is really bad and you help a lot !!!my school doesn't do a very good job of teaching programming so u are awesome
import random as rd 1:00 random float number between excl. (0 and 1) --> rd.random() 1:55 random float number berween excl.(1 and 10) --> rd.uniform(1, 10) 2:30 random int number between incl. [1 and 10] --> rd.randint(1, 10) 3:30 random list element between incl. [1 and 10] --> rd.choice(list) 4:20 random list elements-list between incl. [1 and 10] --> rd.choices(list, k=100) 5:40 rd.choices(list, weights=[8.0987,0,10,2,7,5.7,10,20,25,5.2], k=100)
Honestly, stumbling into your tutorials has been a great blessing to me. Your wealth of knowledge shows a versatility of experiences that is far advanced. I have learnt alot from savouring your tutorials and am really grateful for all you do. Thanks a lot sir. Kind regards from Nigeria
You have the best tutorials ever, I mean you are making everything much easier and explaining concepts deeply and correctly, most of the tutorials out there are not doing that, thanks!!
This is pretty cool! I was just searching for how to use random in Python. And probably this is THE BEST tutorial that exactly expressed what I want. Thanks a lot, Corey for this wonderful video!
Corey you are so good at teaching this stuff. I love the way you deal with each particular topic, it makes it much easier to understand. So many videos seem to jump from one topic to another. I know this stuff isn’t easy to teach but you make easier. Thanks man.
You are my favorite python tutor and I always recommend to people your channel. Because you explain the very easiest and efficient way than spending too much time reading python documentation. Thank you @corey.
I've been struggling my way through some classes at my community college and your videos have saved my bacon on more than one occasion. Thank you for the clear and concise content. Keep it up!
There are lot people are excellent at programming languages, and thanks to them for willingness to teach others. However, there are only an handful that could explain and teach others. You are small number of the later category. Thank you.
Holy cow! Thank you, Mr. Schafer. I was able to use this to understand how to generate a useful (and DRY!) function to handle skill rolls in my TBS Game!
Hey Corey, Thank you so much for this! I was working on a "random" number generator for a few days and was pulling aspects from multiple sources. I happened to stumble onto your video and realized that I needed to make the code into smaller pieces rather than larger ones. I was trying to have the random function that I was using do more things than it was designed to and thus kept getting an error of some sort. When I first wrote it, I couldn't get the program to loop and then if I had to roll higher than the numbers present it ran into an error due to population size so I had to find how replacement worked. Now it works. However, it has "none" twice when the program ends but that is minor. I believe it is because of my while loop and having to place return at the end in order for the loop to exit when I have do not have anymore rolls to do. Thank you again!
Thank you so much Corey for making time out to make all these available. You make learning python very smooth. I will definitely follow through all of these contents and practice and practice and practice. Thanks once again
Thank you!! I'm teaching myself to code and I've been searching everywhere for the 'random.choice' function!! 😂 I can now receive a value from a list at random!
Nice tutorial 👍🤗 u are my one of the most favorite teachers whom I came across :) Anyways, I think we can leave range without list function also right, cuz it already returns a list of the given range..🤔 Love from India :)
I just learned more in 10 minutes than I have in 10 days trying to read about this on my own. Thanks! =)
Good to hear! Glad you found it helpful
BTW, is that Cooper's Rock in your profile picture? I used to live in Morgantown, WV and it looks very familiar
+
maybe you have dyslexia..people with dyslexia learn easily throw videos
@@coreyms haha yes! It sure is =)
It's been 5 years after you've made this tutorial and your work has still managed to help someone learn. Thank you Corey
Amazing how Corey can teach the same concepts, but his tutorials are head and shoulders above all others!
every time I want to learn the important parts of a module without having to read its documentation, I come straight to your page. You do an incredible job Corey.. Thank you!
Told me exactly what I needed to know, saved me from any more searching through forums. Thank you!
man, I am a starter programmer, of course, python, you teach and explain so well!!! my teacher is really bad and you help a lot !!!my school doesn't do a very good job of teaching programming so u are awesome
i agree
import random as rd
1:00 random float number between excl. (0 and 1) --> rd.random()
1:55 random float number berween excl.(1 and 10) --> rd.uniform(1, 10)
2:30 random int number between incl. [1 and 10] --> rd.randint(1, 10)
3:30 random list element between incl. [1 and 10] --> rd.choice(list)
4:20 random list elements-list between incl. [1 and 10] --> rd.choices(list, k=100)
5:40 rd.choices(list, weights=[8.0987,0,10,2,7,5.7,10,20,25,5.2], k=100)
Honestly, stumbling into your tutorials has been a great blessing to me. Your wealth of knowledge shows a versatility of experiences that is far advanced. I have learnt alot from savouring your tutorials and am really grateful for all you do.
Thanks a lot sir.
Kind regards from Nigeria
You have the best tutorials ever, I mean you are making everything much easier and explaining concepts deeply and correctly, most of the tutorials out there are not doing that, thanks!!
This is pretty cool! I was just searching for how to use random in Python. And probably this is THE BEST tutorial that exactly expressed what I want. Thanks a lot, Corey for this wonderful video!
I'm here in 2022 and this was so helpful. The explanation is clear and precise, no fluff. Thank you.
Corey you are so good at teaching this stuff. I love the way you deal with each particular topic, it makes it much easier to understand. So many videos seem to jump from one topic to another. I know this stuff isn’t easy to teach but you make easier. Thanks man.
see mine too. A full Python crash course tutorials step by step, sequentially, with all the source files downloadble too.
You are my favorite python tutor and I always recommend to people your channel. Because you explain the very easiest and efficient way than spending too much time reading python documentation. Thank you @corey.
Learnt more about Python more from ur videos than entire college year
I've been struggling my way through some classes at my community college and your videos have saved my bacon on more than one occasion. Thank you for the clear and concise content. Keep it up!
There are lot people are excellent at programming languages, and thanks to them for willingness to teach others. However, there are only an handful that could explain and teach others. You are small number of the later category. Thank you.
Never seen such an amazing teacher ever in my whole life. God Bless you .
Holy cow! Thank you, Mr. Schafer. I was able to use this to understand how to generate a useful (and DRY!) function to handle skill rolls in my TBS Game!
Holy Beautiful
Very awesome lesson on random numbers in under 14 minutes!!!
The random.choices part connected with the weights/probabilities is super helpful :) In another tutorial this command was not mentioned. I love it :)
thank you for all the new concepts on random math functions, didn't know there was this much support for mathematical concepts
wow this chanel is a real deal . i learned a lot from one 10 mins videos i can't believe this
After so many searches, I found yours.. Thank you so much! Really simple explanation 👌👌
I can't say enough Thanks in every video you created on python and more!
bro i learned more in 10 min than in 5 days.. thanks a lot
This was Amazing!
After seeing this video I was very excited to use this random function in my computer.
Thanks for this useful information.
Hey Corey,
Thank you so much for this! I was working on a "random" number generator for a few days and was pulling aspects from multiple sources. I happened to stumble onto your video and realized that I needed to make the code into smaller pieces rather than larger ones. I was trying to have the random function that I was using do more things than it was designed to and thus kept getting an error of some sort. When I first wrote it, I couldn't get the program to loop and then if I had to roll higher than the numbers present it ran into an error due to population size so I had to find how replacement worked. Now it works. However, it has "none" twice when the program ends but that is minor. I believe it is because of my while loop and having to place return at the end in order for the loop to exit when I have do not have anymore rolls to do.
Thank you again!
Thank you so much Corey for making time out to make all these available. You make learning python very smooth. I will definitely follow through all of these contents and practice and practice and practice. Thanks once again
Great teaching Corey!
U solved the error i spent a week on in one minute true legend
Thank you Corey for your time and effort. Keep spreading the knowledge.
With your videos! I learn python and practice my english too! You are awesome ️man!
Thank you, Corey. This is simple and straight to the point.
It is the one of the best tutorial that I found and best recommended for beginners. Appreicate the efforts and God bless
This is such a good channel. Really well done.
your videos help me a lot during CS.s Exam
Thank you, best course of python I have ever found
Cool. Thanks for this one. I been dirtying-up the code a bit to make the mailing addresses look even more randomly typed out.
This really really helped me out a lot, thanks so much for this tutorial! I'm a FAN! You rock! 💯💯💯💯
This was incredibly helpful and very simple. Thank you!!
Super fast! Understand everything! No bullshit around
Thanks!
Thank you!! I'm teaching myself to code and I've been searching everywhere for the 'random.choice' function!! 😂 I can now receive a value from a list at random!
Great video with lots of informations. Thank you Corey.
Very clear and straightforward, +1
Big bro, your teaching style is just awesome, after Bucky from the new Boston, you are my favorite programming teacher... God bless you
this was exactly what I was looking for, thanks!
You rock, Corey! I wish I found you earlier. That's one more amazing explanation.
Dude, this is awesome. Very helpful and well explained! Thank you!!!
this was simply amazing. thank you!!
your videos are excellent. Your videos are very much useful to me, Many thanks for that. My warm regards to you.
I loved this man...can you do another one explaining how to link the random data to a user's input to consider a lucky winner.
amazing video brro you just clear all my doubts soo easily.......thank you sooo much
You are doing really great thank you so much!
Very good! Thanks for that
So cool 😎😎. Love this tutorial!
And you earned a sub. 👍
Thanks a lot, this tutorial is so clear and helpful
Hellooo! , probably Im the first one and opened sublime text immediately to do what you are gonna teach :) ty from now ^^
Selman Ay, you could be first, but not alone v(=∩_∩=)フ
Thank you so much for this awesome video, it gives me more idea about the random module. thank you again.
I learned a lot in this video, thank you so much for this video. :)
Omg thanks. I have learnt thanks to you
No words to say thankuu... Awesome content🙇🙇🙇🙇🙇🙇🙇🙇🙇🙇🙇🙇🙇🙇
Nice & Easy Concepts ,Thanks for the informative video
Omg , yes I finally found what I was looking for , thanks a lot
Great Video! You helped me a lot. Thanks👍
very precise and super insightful
Nice explanation 👍👍
Oh boy, I needed this video! THANKS.
great video, happy that I' ve found your channel
Awesome 😎 just straight forward to the point 👍👍💯 Now, I am loyal subscriber to your channel✅
This was ribeye quality, thanks!
Example🔥...loved this idea🔥
very clear explanation :) thank you :)
This is awesome!! Thank you so much!!
Thank you for enabling to generate data for practicing
I've read about random functions in Python all the time but from your video the commands got burned in my brain. I learned ay more from this.
good one , easily understood
thanks man
Thank you very much, sir! You helped me a lot! You gave me a few steps to my dream to be a programmer :0
I really needed this. Thank you so much
that actually helped a lot man.
thanks
Nice tutorial 👍🤗 u are my one of the most favorite teachers whom I came across :)
Anyways, I think we can leave range without list function also right, cuz it already returns a list of the given range..🤔
Love from India :)
Goddamm, that was a lot of info and I understood it all.
Mighty impressed, and I'm usely super slow to understanding this kind of stuff
I’m making a blackjack game using this thank you for helping
Thanks, very useful information. Really like the weight parameter and sample method, didn't knew it before :)
Thanks bro it helped me lot as a beginner
I have learned a lot from your video. you are amazing. you are simly the best.and you have really nice voice. Its so cool!!!!
thanks Corey your videos are great!
This was AWESOME!!!
Thank you very much for this video :) It was very helpful!
Thanks a lot. This help me fixed the bug in my game.
This was very useful, thank you 😊
Excellent work keep on work like this broo❤😊
you can get integers in the uniform method by placing and "int(random.uniform(1, 10))"
another awesome vid you should write a book how to program the
Corey Schafer way best seller in the tech industry fo sure
thank u sir ,for such a amazing video
to get better list you can do:
list {
'random1',
"ramdon2,"
}
still love this video, so ill probably sub
You're Legend ..Keep Going
I got to say: Thank you a lot! You got one more subscriber too.
Do you know what a subscript is
@@xfire3778Oh, I am not a native speaker LOL I think it should be subscriber, right?
Elber Almeida yeah 👍
great video buddy!
What a dope video OMG.
awesome. that "for num in range ..." section helped me with the problem I had.