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! 😊
    ******************************
  • НаукаНаука

Комментарии • 225

  • @Khalil-Artur
    @Khalil-Artur 2 года назад +30

    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.

    • @PythonSimplified
      @PythonSimplified  2 года назад +16

      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! 😊

  • @DAGGETT062891
    @DAGGETT062891 26 дней назад +3

    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!

  • @codeKeshav
    @codeKeshav 2 года назад +11

    Video gave feeling of real physical classroom

    • @PythonSimplified
      @PythonSimplified  2 года назад +1

      I hope it's a good thing! 🤪 hahaha thank you Keshav! 😊

  • @Tom-wm4gy
    @Tom-wm4gy 2 года назад +41

    Really the best Function Tutorial ever!
    It doesn't fall on "def" ears...
    Thank you so much!

    • @PythonSimplified
      @PythonSimplified  2 года назад +9

      hahahahahaha on def ears!!!!!! 🤣🤣🤣
      Thank you so much for the lovely (and hilarious!!!) comment, Tom! 😁
      It's DEFinitley the perfect pun for this video! 🤪

  • @delltoid5980
    @delltoid5980 2 года назад +11

    Wow your teaching methods are brilliant. I have a difficult time learning things, but your manner of explaining makes sense to me. Highly impressive.

  • @austinlattimore8000
    @austinlattimore8000 Год назад +5

    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.

  • @shoshanamofaz3012
    @shoshanamofaz3012 2 года назад +2

    Shalom. I didn’t get a notification about this video so I’m late responding. Just want to say you’re good teacher

  • @CurrentElectrical
    @CurrentElectrical 2 года назад +2

    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.

  • @oliviermuzereau6835
    @oliviermuzereau6835 Год назад

    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.

  • @d-rey1758
    @d-rey1758 Год назад +2

    it's amazing how other's can make this subject so complicated... and others can make it sooo easy. great vid 👍

  • @trtlphnx
    @trtlphnx 2 года назад +8

    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 ~

    • @PythonSimplified
      @PythonSimplified  2 года назад

      Thank you very much my dear! 😁😁😁
      I usually go by viewer suggestions and requests, so It's hard to go wrong 😉

  • @sammylevalthon6845
    @sammylevalthon6845 2 года назад +4

    I really hoping that mariya you would create a video on this topic and finally you did it

    • @PythonSimplified
      @PythonSimplified  2 года назад +5

      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! 😁

  • @user-om9fu7hz7g
    @user-om9fu7hz7g 25 дней назад

    very nice and simple explanation, this is how everyone should teach, thanks, please continue making videos on Python, thanks!

  • @brunomaunac8287
    @brunomaunac8287 Месяц назад

    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!

  • @alihussien7935
    @alihussien7935 5 месяцев назад +1

    God bless you
    the best explanation ever.
    big support for you.
    keep doing it

  • @HagamosLoImposible
    @HagamosLoImposible 2 года назад +2

    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

  • @po9098
    @po9098 Год назад

    Music to my ears. Thank you so much for being a wonderful teacher!

  • @stephenmolyneux3936
    @stephenmolyneux3936 2 года назад

    This format is great for being able to understand what is going on. Thanks.

  • @mohamedoscar-zj2vf
    @mohamedoscar-zj2vf Год назад

    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")

  • @1teezee
    @1teezee Год назад

    mmm...cookies.
    Love the visual aids and the way you explain things. Definitely Python Simplified

  • @davidcalebpaterson7101
    @davidcalebpaterson7101 2 года назад +2

    Another wholesome video with a very good explanation of functions ❤✨👌

  • @user-gt3dl8nj4w
    @user-gt3dl8nj4w 6 месяцев назад

    Love your your tutorials,,they've entirely contributed to my python progress from the scratch.😇

  • @juany4355
    @juany4355 2 года назад

    Magnificient as always...so glad to learn here, love your voice & teaching style. Greetings from Chile & thanks again!!!

  • @patocuchara01
    @patocuchara01 2 года назад +1

    I like the explanations, so easy for the people who is starting python, great work!!!

  • @Romermedia
    @Romermedia Год назад

    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!

  • @Anointingify
    @Anointingify Год назад

    Thank you for this amazing video presentation, I have never had this topic made so simple.
    I enjoy your works.

  • @luizwerneck9262
    @luizwerneck9262 2 года назад +4

    Is very usefull your explannation about the functions using colors. Here from Brazil congrats you. Tom and Jerry is the best!

    • @PythonSimplified
      @PythonSimplified  2 года назад +4

      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! 🍁

  • @keagankemp6275
    @keagankemp6275 2 года назад +1

    Thank you for sharing your knowledge Mariya really appreciate it .

  • @MohamedIbrahimEid
    @MohamedIbrahimEid Год назад +1

    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

    • @easydatascience2508
      @easydatascience2508 Год назад

      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.

  • @joespratling
    @joespratling 2 года назад

    Thank you so much for explaining all your tutorials so clearly really really helpful

  • @TheBarryLight
    @TheBarryLight 2 года назад

    What can I say, I love your videos and I can't wait to see more :D

  • @hep1731
    @hep1731 2 года назад +4

    hello maria thank you for the nice video and i love your cute t-shirt it's so beautiful

  • @Tobs_
    @Tobs_ 2 года назад +3

    Great stuff, thanks. 👍

  • @johnmamodu6650
    @johnmamodu6650 2 года назад

    You made learning python so refreshing....Thank you

  • @dr.mohamedaitnouh4501
    @dr.mohamedaitnouh4501 Год назад

    Thank you for the positive and relaxed attitude. Your trick on colors with python is interesting. I subscribed and nice greetings from California!!

  • @vitaliiboiko6227
    @vitaliiboiko6227 Год назад

    thank you so much! I like your channel because you explain heard things very simply. Well done!!!

  • @santosbio
    @santosbio Год назад +1

    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. ❤️

  • @devvsakib5223
    @devvsakib5223 2 года назад +3

    I really really like your video tutorial and your expression... Easy to understand, you make it easier.....and muahahahaha..hihi

    • @PythonSimplified
      @PythonSimplified  2 года назад +1

      hahaha thank you so much for the lovely feedback DevvSakib! 😀

  • @atfl0000
    @atfl0000 Год назад

    Awesome video Maria, thank you for teaching Python! :-)

  • @yaishk
    @yaishk 5 месяцев назад

    Thanks for dumbing everything down! Your content is golden!

  • @Stylish_Bandit_Slayer
    @Stylish_Bandit_Slayer Месяц назад

    Thank you so much . Functions are so much clearer now.

  • @PhotolessonsOrg
    @PhotolessonsOrg Год назад

    very useful description of functions! Thank`s a lot!

  • @redaoutarid6465
    @redaoutarid6465 2 года назад +1

    Congrats on your new learning concept.
    It's a very good concept

  • @warrenscorner
    @warrenscorner 2 года назад

    Great video! Very simple to understand for a beginner like me.

  • @zakmatew
    @zakmatew Год назад

    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.

  • @po9098
    @po9098 Год назад

    The random color program is awesome!

  • @leandrof325
    @leandrof325 Год назад

    Hi Mariya. I love your explaining!!! Thanks for be a teacher!

  • @untelevisedfringe4552
    @untelevisedfringe4552 2 года назад +2

    Great video Mariya, thanks 🙏

  • @ODRACLIVE
    @ODRACLIVE 2 года назад

    Thank you, Mariya!!!

  • @lloyd1934
    @lloyd1934 Год назад

    Amazing functio tutorial. Thank you

  • @shaikhzishan5342
    @shaikhzishan5342 2 года назад

    Python functions just simplified 👍 what an explanation ma'am

  • @noslenwerdna
    @noslenwerdna 2 года назад +4

    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.

  • @belovedobiora549
    @belovedobiora549 2 года назад +3

    I LOVE YOUR TEACHING , IT'S AMAZING AND ONE OF THE BEST I'VE SEEN👍

    • @PythonSimplified
      @PythonSimplified  2 года назад

      Thank you so much!! I'm super happy to hear that!! 😀😀😀

  • @blevenzon
    @blevenzon 2 года назад

    Thanks so much, very clear and concise.

  • @manny.23
    @manny.23 Год назад

    This was really helpful, thanks a lot.

  • @3Beats_2words
    @3Beats_2words 2 года назад

    Thanks for the lesson. I am very fond of your soothingly typing sound and the humorous "muahahaha..." part. ^_^

  • @erickguillermozarate6263
    @erickguillermozarate6263 Год назад

    Tus videos son excepcionales, muy claros. Gracias por ello.

  • @Borolad116
    @Borolad116 Год назад

    Great video, Mariya. You have a new subscriber, thank you :)

  • @user-np1od8ch2p
    @user-np1od8ch2p Год назад

    You are awesome you nailed it
    You taught very proficient way

  • @ppmokgoro
    @ppmokgoro Год назад

    It just took watching this video once fam - ONCE!!!! I luv you!!

  • @jfarr206
    @jfarr206 Год назад

    Very good explanation. Thank you

  • @jeenap.r6648
    @jeenap.r6648 Год назад

    I watched your class from Kerala
    What a wonderful teaching
    Thank you very much🎉❤

  • @jpkeys6000
    @jpkeys6000 2 года назад

    Pure Gold!

  • @mayilvagananm695
    @mayilvagananm695 Год назад

    Lovely functions, I love your teaching maria,.

  • @richi1235
    @richi1235 2 года назад +7

    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 😉

    • @PythonSimplified
      @PythonSimplified  2 года назад +6

      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 😅

    • @richi1235
      @richi1235 2 года назад +2

      @@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.

  • @sezerkarabugul
    @sezerkarabugul Год назад +1

    Thanks a lot for this great tutorial.

    • @PythonSimplified
      @PythonSimplified  Год назад

      Absolutely! Enjoy! Thank you so much for your comment! 😀

  • @Volcan-kf3oz
    @Volcan-kf3oz Год назад

    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"

  • @secureless
    @secureless Год назад

    I see two apps that a programmer can rest on the right side of the screen, EPIC and STEAM! )) Thanks Maria 🙏

  • @ayushsrivastava6133
    @ayushsrivastava6133 2 года назад +2

    I really in love with you !! The way you explain each and every topic is amazing ❤️

    • @PythonSimplified
      @PythonSimplified  2 года назад +2

      Thank you so much for the lovely comment, Ayush! I'm super happy you like my videos! 😁😁😁

    • @ayushsrivastava6133
      @ayushsrivastava6133 2 года назад

      @@PythonSimplified Always and forever 😀🔥

  • @internetuser4689
    @internetuser4689 2 года назад

    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!

  • @mohammed_Ansar
    @mohammed_Ansar Год назад

    I am in love with ur voice 😍 and teaching style. Very simple 👌

  • @jarjarjar9006
    @jarjarjar9006 2 года назад

    your look help me so much with lering coding :)

  • @viniciuspozati
    @viniciuspozati 7 месяцев назад

    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

  • @database_tips_tricks
    @database_tips_tricks 2 года назад

    So simple and easy to follow tks

  • @ramyelioa8187
    @ramyelioa8187 7 месяцев назад

    Exellent very good work thanks

  • @anurangafernandomax3568
    @anurangafernandomax3568 Год назад

    Good explain
    thank you !

  • @anokhautomation4453
    @anokhautomation4453 2 года назад

    Nice tutorial 🎉🎉👍👌

  • @leleuf3
    @leleuf3 2 года назад +1

    Amazing!!!!

  • @edwardchifike396
    @edwardchifike396 2 года назад

    Thats great content keep it up

  • @PersecutedPursuer
    @PersecutedPursuer Год назад

    Wonderful Explanation which helped a lot! Thank you very much!
    PS: I miss the fifth Function - Pooping out the Cookie lol

  • @SharinganBankaii
    @SharinganBankaii 8 месяцев назад

    Thanks for the video!+

  • @PedroGomes-sz5ot
    @PedroGomes-sz5ot 2 года назад +1

    Estou aprendendo com você duas coisas: Python e Inglês.
    great tutorial! Thank you, Pedro Gomes - São Paulo - Brasil

    • @johnnya3584
      @johnnya3584 2 года назад +1

      Eu também man!! Além da boa didatica dela, o ingles é bem pausado e claro. Facinho de entender.

  • @suvimpemel5583
    @suvimpemel5583 2 года назад +3

    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.

  • @phon_o_rama2169
    @phon_o_rama2169 2 года назад

    Thank you!!!

  • @zakyvids6566
    @zakyvids6566 2 года назад +1

    Please make a python crash course 2022 This is highly recommended Thanks a lot I have subscribed awesome content

  • @rickeyestes
    @rickeyestes Год назад

    Thanks!

  • @HuongPham-lr2fp
    @HuongPham-lr2fp 8 месяцев назад

    quá tuyệt vời, you are supperman in python

  • @backrank3264
    @backrank3264 2 года назад

    Hi mariya...super happy to see you again with a nice tutorial from nice girl❤️

  • @kishorbis
    @kishorbis Год назад

    Very nice

  • @jinxianlai
    @jinxianlai 3 месяца назад

    happy to see you again ,shawty

  • @Alphabet_-_
    @Alphabet_-_ 2 года назад +3

    Colored Girl Thumbs UP

  • @eddw123
    @eddw123 2 года назад

    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 💯👍

  • @emersonespinoza932
    @emersonespinoza932 2 года назад

    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

  • @journeynewson7291
    @journeynewson7291 8 месяцев назад

    great video... awesome shirt

  • @johanjuarez6238
    @johanjuarez6238 Год назад

    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 😊

  • @ramarisonandry8571
    @ramarisonandry8571 2 года назад

    Thanks from Madagascar

  • @Pixel_Recap
    @Pixel_Recap Год назад +1

    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?

  • @luricci8471
    @luricci8471 2 года назад +1

    thx 🥰

  • @mikekerry7989
    @mikekerry7989 Год назад

    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.

  • @ReflectingMe2024
    @ReflectingMe2024 2 года назад +1

    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.

    • @PythonSimplified
      @PythonSimplified  2 года назад +3

      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! 😊

    • @ReflectingMe2024
      @ReflectingMe2024 2 года назад

      @@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... :)