Learn Python Functions - Quick Python Project For Beginners
HTML-код
- Опубликовано: 28 июн 2024
- In this tutorial, we will talk about Python functions and how we can use them to change the text colours in our terminal/console!
We will begin with an overview of functions and we will finish with a quick (but useful! 💪💪💪) code project!
If you're curious about my IDE - I'm using Wayscript which is now available for the wide public! you no longer need an invitation, you can simply sign up with the following link: app.wayscript.com
Complete Code for Random Console Text Colour Generator:
github.com/MariyaSha/ChangeCo...
⭐ Related Tutorials ⭐
What is RGB and how images can be represented with numbers:
• Convert Image into Mat...
Create RGB Images with OpenCV:
• Draw with OpenCV - No ...
******************************
⏰ TIME STAMPS ⏰
******************************
00:00 - intro
00:14 - what are functions?
00:41 - Python functions
01:04 - local variables
01:24 - return statement
02:30 - function call
02:47 - function parameters
03:37 - function arguments
04:09 - coding Python functions
05:37 - randomly change console text color
06:09 - RGB color mode
09:24 - function primary goals
09:48 - thanks for watching! 😊
****************************** - Наука
First I have to thank you for you amazing work. Second I confess that I stole your funny change color function, to show it more that 100 people, I taught python function today. In return I highly recomended your channel, so more than 100 grils and boys from Poland, Spain, Germany and other countries heard about Python Simpified. I hope you will not be mad and not send me some killing bot :-) Thanks for inspiration.
Hahahahaha wow!! thank you so much Artur!! 😄😄😄 I'm so happy you liked my function and even happier that you used it in your own lesson!! 😃
The main purpose of this channel is to help people so don't worry about killing bots, they're not meant for folks like you!! 🤣🤣🤣 hahahaha
Please feel free to use any other materials you like for you lessons - anything that would get those 100 boys and girls excited about Python!
Thank you so much again, it's a great honor! 😊
You are hands down the BEST python tutorial teacher. I haven't seen a video that breaks down every single step, leaving NO details unexplained.
You don't assume I know all the Python terminology, allowing me to really understand the basics.
You are the BEST on youtube!
Video gave feeling of real physical classroom
I hope it's a good thing! 🤪 hahaha thank you Keshav! 😊
Really the best Function Tutorial ever!
It doesn't fall on "def" ears...
Thank you so much!
hahahahahaha on def ears!!!!!! 🤣🤣🤣
Thank you so much for the lovely (and hilarious!!!) comment, Tom! 😁
It's DEFinitley the perfect pun for this video! 🤪
Wow your teaching methods are brilliant. I have a difficult time learning things, but your manner of explaining makes sense to me. Highly impressive.
I love the way you teach and break things down to the simplest level and make it very easy to understand. your doing great work I will recommend your channel to others.
Shalom. I didn’t get a notification about this video so I’m late responding. Just want to say you’re good teacher
A great tutorial and refresher! Thank you from Ontario. I love getting the fundamentals down in an easy to understand code along. It keeps the mind active and fresh.
Thanks a lot. I have been looking for a long time to change text color in python.
It's a real pleasure to watch your videos and pick up cool tips here and there.
it's amazing how other's can make this subject so complicated... and others can make it sooo easy. great vid 👍
I Absolutely Love Your Choice Of Subjects and How You Present Them, You Are My Favorite Presenter On The"Tube" ~
Love You And The Information You Bring To The Table ~
Thank you very much my dear! 😁😁😁
I usually go by viewer suggestions and requests, so It's hard to go wrong 😉
I really hoping that mariya you would create a video on this topic and finally you did it
Yeeeey! I'm super happy to hear!! 😀
I'll be posting more and more of these Python basics tutorials as time goes by!
They're a bit more complicated to make than the coding-only tutorials - but I find that it's much easier to understand something with real life examples and with colorful illustrations! Also pictures and drawings are much easier to remember than text, so hopefully you find these videos more helpful than the kind that all the fancy online academies have to offer 😉
Thank you so much, dear! 😁
very nice and simple explanation, this is how everyone should teach, thanks, please continue making videos on Python, thanks!
good morning,
I'd like to thank you for these videos which I find interesting, well explained and very understandable for those who don't speak English naturally. I've been following you for a while and I'm looking forward to your next videos to learn more now that I've decided to get back to programming in Python for my hobby.
Have a nice day!
God bless you
the best explanation ever.
big support for you.
keep doing it
I really really like this type of Tutorials, with clar english an amazing explanation. I also like the mixed of advanced tutorial, ML, AI, APPS, a this one, basics, to improve the knowledge of python! Thanks Maria
Music to my ears. Thank you so much for being a wonderful teacher!
This format is great for being able to understand what is going on. Thanks.
This is what I learned from you. I understood how to think and create from the beginning
Thanks ............
import random
from sty import fg
class well:
def play(self):
red = random.randint(0, 255)
green = random.randint(0, 255)
blue = random.randint(0, 255)
return red, green, blue
def oscarzoom(self,red, green, blue):
return fg(red, green, blue)
color = well()
red, green, blue = color.play()
print(color.oscarzoom(red, green, blue) + "mohamed")
mmm...cookies.
Love the visual aids and the way you explain things. Definitely Python Simplified
Another wholesome video with a very good explanation of functions ❤✨👌
Love your your tutorials,,they've entirely contributed to my python progress from the scratch.😇
Magnificient as always...so glad to learn here, love your voice & teaching style. Greetings from Chile & thanks again!!!
I like the explanations, so easy for the people who is starting python, great work!!!
Thank you for properly explaining the For Loop. I'm using an app to learn Python but your videos are much easier to understand what I'm not getting through the app. Thanks!
Thank you for this amazing video presentation, I have never had this topic made so simple.
I enjoy your works.
Is very usefull your explannation about the functions using colors. Here from Brazil congrats you. Tom and Jerry is the best!
Tom and Jerry are legends!! 💪💪💪 I think I remember all the episodes by heart! 😀
I'm super happy you liked the colours explanation! I keep thinking of ideas that are both educational and fun and it's not always an easy task! hahahaha I guess this time it worked! 😉
Cheers from Vancouver! 🍁
Thank you for sharing your knowledge Mariya really appreciate it .
I like your style of sharing knowledge with us is an amazing. Everytime I need to refresh a concept, I get back your channel. Thanks Mariya
Nice comment. You can also check mine. Many fundamental tutorials for Python, with all the source files. And the channel has currently another playlist for R.
Thank you so much for explaining all your tutorials so clearly really really helpful
What can I say, I love your videos and I can't wait to see more :D
hello maria thank you for the nice video and i love your cute t-shirt it's so beautiful
Thank you so much! Glad you liked it!😀
Great stuff, thanks. 👍
You made learning python so refreshing....Thank you
Thank you for the positive and relaxed attitude. Your trick on colors with python is interesting. I subscribed and nice greetings from California!!
thank you so much! I like your channel because you explain heard things very simply. Well done!!!
First of all, your videos are THE GREATEST VIDEOS OVER THE INTERNET!
I'd like to suggest to put English subtitles on your videos. I have a friend (she's deaf) and she's starting to learn python/Django, I think she'll learn a lot with them. ❤️
I really really like your video tutorial and your expression... Easy to understand, you make it easier.....and muahahahaha..hihi
hahaha thank you so much for the lovely feedback DevvSakib! 😀
Awesome video Maria, thank you for teaching Python! :-)
Thanks for dumbing everything down! Your content is golden!
Thank you so much . Functions are so much clearer now.
very useful description of functions! Thank`s a lot!
Congrats on your new learning concept.
It's a very good concept
Great video! Very simple to understand for a beginner like me.
I have watched many videos "for beginners" but pretty much all of them failed at structurally explaining the different components of the syntax. This video provided clear explanations for those who are not familiar with the lingo.
The random color program is awesome!
Hi Mariya. I love your explaining!!! Thanks for be a teacher!
Great video Mariya, thanks 🙏
Thank you Super Mario! 😁😁😁
Thank you, Mariya!!!
Amazing functio tutorial. Thank you
Python functions just simplified 👍 what an explanation ma'am
Since this is a beginner's playlist, you kind of left out something from your last video to this one... and that would be "import". Could you please add a video between 5 Loops and 6 Functions, on using the import to explain importing libraries and the "from" statement as well. Thank you.
I LOVE YOUR TEACHING , IT'S AMAZING AND ONE OF THE BEST I'VE SEEN👍
Thank you so much!! I'm super happy to hear that!! 😀😀😀
Thanks so much, very clear and concise.
This was really helpful, thanks a lot.
Thanks for the lesson. I am very fond of your soothingly typing sound and the humorous "muahahaha..." part. ^_^
Tus videos son excepcionales, muy claros. Gracias por ello.
Great video, Mariya. You have a new subscriber, thank you :)
You are awesome you nailed it
You taught very proficient way
It just took watching this video once fam - ONCE!!!! I luv you!!
Very good explanation. Thank you
I watched your class from Kerala
What a wonderful teaching
Thank you very much🎉❤
Pure Gold!
Lovely functions, I love your teaching maria,.
I am really a fan of explicitly stating the types of function parameters and function returns...wish more people would do that even though you don't have to in python 😉
Sounds like someone is coming from C++, eh?? 😜
I most definitely agree! stating the expected data types makes working in a team much easier! it really helps avoiding silly mistakes - so I'm all for that even if it means a bit more typing! 😀
I usually include a multi-line comment at the top of the function which takes care of that, but since this was such a quick project - it would have taken longer to read the comment than to understand the entire code on your own hahahah 😅
@@PythonSimplified I understand, for this demo it might not have been all that neccessary.
But yeah, i am speaking from experience of working on larger projects, either in teams or by myself. It really can come in handy. There are for example nice testing tools that can make good use of these annotations. You can also use the type hints to do some runtime type checking.
Thanks a lot for this great tutorial.
Absolutely! Enjoy! Thank you so much for your comment! 😀
This helped me understand the usage of return I never really understood it when looking through tutorials but as I see it it basically turns a function call into a "variable with argument that can be changed"
I see two apps that a programmer can rest on the right side of the screen, EPIC and STEAM! )) Thanks Maria 🙏
I really in love with you !! The way you explain each and every topic is amazing ❤️
Thank you so much for the lovely comment, Ayush! I'm super happy you like my videos! 😁😁😁
@@PythonSimplified Always and forever 😀🔥
If I would have had a teacher like you I wouldn't have played Blobby Volley game in the informatics classroom in highschool.
But at the same time it would have been hard to concentrate when you present the lesson...
I sound like I'm in 💕. Joking 😃 keep it up!
I am in love with ur voice 😍 and teaching style. Very simple 👌
your look help me so much with lering coding :)
i learned a new think, i had a problem "ModuleNotFoundError: No module named
'sty' "..... after i tryed some i try this at console "pip install sty" and uala! works ! thanks girl a one more day studing
So simple and easy to follow tks
Exellent very good work thanks
Good explain
thank you !
Nice tutorial 🎉🎉👍👌
Amazing!!!!
Thank you so much Elias! 😀
Thats great content keep it up
Wonderful Explanation which helped a lot! Thank you very much!
PS: I miss the fifth Function - Pooping out the Cookie lol
Thanks for the video!+
Estou aprendendo com você duas coisas: Python e Inglês.
great tutorial! Thank you, Pedro Gomes - São Paulo - Brasil
Eu também man!! Além da boa didatica dela, o ingles é bem pausado e claro. Facinho de entender.
Hi Mariah, I think you should make an video on ARGS and KWARGS next though you have covered ARGS here.
I personally think KWARGS could help me in certain cases, but always little short of time to go through and try out.
Thanks for this video.
Thank you!!!
Please make a python crash course 2022 This is highly recommended Thanks a lot I have subscribed awesome content
Thanks!
quá tuyệt vời, you are supperman in python
Hi mariya...super happy to see you again with a nice tutorial from nice girl❤️
Very nice
happy to see you again ,shawty
Colored Girl Thumbs UP
Thank you! 😀
And If you add in the line 3 this
for i in range(0,10):
😉It will give nice result to cover its functionality and application.
Thanks for your videos 💯👍
Aprendo muito com você e ensina muito bem, agora preciso tomar vergonha na cara e aprender inglês para te acompanhar e ter uma experiência melhor rsrs
great video... awesome shirt
Thank you so much for the work you've put in this channel. I have question. I'm trying to learn python by watching tutorials, experimenting it and asking chat Gpt to write code for me, evaluate mine, correct it, explain etc. But it made me learn about f-strings, and I wonder why someone would use commas to concatenate the variables instead of using curly brackets with f-strings. I am aware there might be compatibility issues but I think there's probably more that I can imagine. If you have time to answer this or anyone reading the comment, I'd like to better understand this. Thank you for the time and energy 😊
Thanks from Madagascar
hi, python simplified, I am amazed at the way you teach python, but the hardest part for me is looping, for loop, and while loop. can you make a more detailed more explained with examples and some exercises?
thx 🥰
I am enjoying your videos, thank you. There is a smll error in this one. The upper and lower limits passed to random.randint are INCLUSIVE. Therefore random.randint(0, 256) could give a value of 256, but as you say, the valid values are 0 to 255.
Another fab video, Mariya, many thanks. Here's a little suggestion for you: How about doing either a tutorial on, or maybe even a development live stream where you code up the Mastermind game using the terminal, and utilise the sty library? Could be interesting... Keep safe, John.
Thank you so much John! 😀
I've never played Mastermind before so I'll need some training on that before I can implement it (or even wrap my head around what it involves 😅 hahaha)
I'll definitely check it out though, thanks for suggesting! 😊
@@PythonSimplified It's a pretty easy game Mariya, just get the computer to generate a tuple of 4 colours out of a total of 8 possible colours, the user then tries to guess the order of those 4 colours (usually these are graphically represented as small circles, or solid blocks). After each guess, the computer then returns how many items the player got right but not in the right location - with a white block, and how many items the player got right and that are in the right location - with a black block. So say the computer generated [red, yellow, black, blue], and the user guesses [orange, orange, red, red] - the return would be one white block due to the correct red colour choice but not in the right location. etc etc... :)