Python Tutorial for Beginners 8: Functions

///Python Tutorial for Beginners 8: Functions

Python Tutorial for Beginners 8: Functions

FavoriteLoadingAdd to favorites

In this Python Beginner Tutorial, we will begin learning how to write functions. Functions are one of the most important things to learn in Python Programming and will take us to the next level. We will learn how to create/define functions, how to pass in arguments, and also how to return values. Let’s get started.

The code from this video can be found at:

Watch the full Python Beginner Series here:

Scope Video:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

source

By |2019-05-09T18:49:57+00:00May 9th, 2019|Python Video Tutorials|27 Comments

27 Comments

  1. Peace zz May 9, 2019 at 6:50 pm - Reply

    1 min on youtube > 7weeks in college :)

  2. fredrick børseth May 9, 2019 at 6:50 pm - Reply

    Hi! Thanks for all the content, I mostly understand the walkthrough at the end – that every fourth year is a leap_year. But how does python know that it's a leap year?

  3. Jacob Lim May 9, 2019 at 6:50 pm - Reply

    My mind is clear and peaceful after watch this lesson. Finally i can understand others tutorials better.
    Thanks for explaining functions in details. I needed this for long time.
    I will forever be grateful about that

  4. David Barrow May 9, 2019 at 6:50 pm - Reply

    def stands for "define", Thanks for the tutorials best on YouTube 😉

  5. Investor Jess May 9, 2019 at 6:50 pm - Reply

    You’re awesome

  6. Ramil Xelilli May 9, 2019 at 6:50 pm - Reply

    Hello! , thank you for these videos which are quiet useful . Almost everything is understood from one sight .
    I have just one question about this video . In the leap (year) function , the condition of 'def is leap(year)' is a bit confused. Can you explain , please

  7. babu John May 9, 2019 at 6:50 pm - Reply

    the *args and **kwargs are not working for me 🙁

  8. Javi May 9, 2019 at 6:50 pm - Reply

    Hi Corey, thank you very much for your awesome videos. I'm learning python at the university and we are using recursion for functions. Could be possible that you make a video explaining that? Thanks in advance!!! (to be honest, I've found some videos on Youtube, but I really still don't understand it)

  9. Thabani Emmanuel May 9, 2019 at 6:50 pm - Reply

    Thanks you Sir your teachings are extremely helpful. so i want to knoe since 29 is not in the month-days ,then maybe it leap year how it gonna happen then .

  10. Seth Jacobson May 9, 2019 at 6:50 pm - Reply

    Corey Schafer you're my hero

  11. تعّلم كل شيء May 9, 2019 at 6:50 pm - Reply

    Thank u but ur talking tooooooooooooooo much dont cut the breathing its okay

  12. Andy N May 9, 2019 at 6:50 pm - Reply

    Learned more from your videos than 5 years at university

  13. Chris Pham May 9, 2019 at 6:50 pm - Reply

    What's the theme of IDLE in the video?

  14. Rapir Apir May 9, 2019 at 6:50 pm - Reply

    what shortcuts do you use for commenting out codes

  15. Issac Wiggins May 9, 2019 at 6:50 pm - Reply

    Hello Everyone,

    Currently I am receiving this error NameError: name 'courses' is not defined. Even though it is defined above my student_info(courses, info) line. Any help would be appreciated thank you.

    def student_info(*args, **kwargs):

    print(args)

    print(kwargs)

    courses = ["Math", "Art"]

    info = {"name": "John", "Age": 22}

    student_info(courses, info

  16. Fotaku Beast May 9, 2019 at 6:50 pm - Reply

    Thank you so much 🙏🏼
    You helped me a lot

  17. jaywalkingly May 9, 2019 at 6:50 pm - Reply

    I liked the example at the end, it was very helpful.

  18. basirr payenda May 9, 2019 at 6:50 pm - Reply

    Thank you sir

  19. ANDY STEPHEN DEJUMO May 9, 2019 at 6:50 pm - Reply

    print(" Karenderya")
    print(" (Please fall in line)")
    print("Menu: n 1.) Breakfast (Combo Meal) n 2.) Lunch (Combo Meal) n 3.) Drinks n 4.) Dessert")
    menu = {
    "1" :"Breakfast",
    "2" :"Lunch",
    "3" :"Drinks",
    "4" :"Dessert"
    }
    choice = input("Enter your category 1:")
    print(menu.get(choice, "Invalid") )

    while True:

    if choice == "1":
    print(" A1.) Tapsilog – P60 n A2.)Longsilog – P50 n A3.)Hotsilog – P45")
    elif choice == "2":
    print(" B1.)Pakbet w/ rice – P35 n B2.)Sinigang na Baboy w/ rice – P50n B3.)Nilagang Baboy w/ rice – P50")
    elif choice == "3":
    print(" C1.)Iced Tea – P20 n C2.) Botteled Water – P12n C3.)Soda – P25")
    elif choice == "4":
    print(" D1.)Brownies – 25 n D2.) Butterscotch – P25 n D3.) Turon – P10")
    break

    while True:
    choice_a = input("Enter your order:")
    if choice_a == "A1":
    print (" Tapsilog – P 60'")
    elif choice_a == "A2":
    print(" Longsilog – P 50")
    elif choice_a == "A3":
    print(" Hotsilog – P 45")

    #===========================================
    if choice_a == "B1":
    print (" Pakbet w/rice – P35")
    elif choice_a == "B2":
    print(" Sinigang na baboy w/ rice – P50")
    elif choice_a == "B3":
    print(" Nilagang Baboy w/ rice – P50")
    #===========================================
    if choice_a == "C1":
    print (" Iced Tea – P20")
    elif choice_a == "C2":
    print(" Botteled Water – P12")
    elif choice_a == "C3":
    print(" Soda – P25")
    #============================================
    if choice_a == "D1":
    print (" Brownies – P25")
    elif choice_a == "D2":
    print(" Butterscotch-P25")
    elif choice_a == "D3":
    print(" Turon- P10")
    else:
    print()
    break
    print(" To compute the price:")
    print()
    price = int(input("Enter the price:"))
    pcs = int(input("How Many Pieces? :"))
    t_price = price*pcs
    print("Total Price:" , t_price)

    print(" To compute the change:")
    print()
    customer_money=int(input("Enter the money of your customer: "))

    print("Change:", customer_money – t_price)

    print("Thank you for your order :-)")

    How can i input the function for this?

  20. SHRIKANTH Y May 9, 2019 at 6:50 pm - Reply

    Thank you and pretty good

  21. johnny onthespot May 9, 2019 at 6:50 pm - Reply

    I love that your videos are FAST paced, CLEAR with no idle chatter and with QUICK examples that show every aspect of what you are teaching. Of all the Python tutorials, yours are the best. 🙂

  22. Meow8404 May 9, 2019 at 6:50 pm - Reply

    14:10 Who else noticed a slight change in his voice?

  23. muffinspuffinsEE May 9, 2019 at 6:50 pm - Reply

    SUBBD, BELLD FAPP- oh nvm too much

  24. m0neez May 9, 2019 at 6:50 pm - Reply

    00:00 def intro
    07:00 passing arguments
    10:27 args & kwargs
    15:01 example

  25. MR B May 9, 2019 at 6:50 pm - Reply

    I tried running the leap_year code snippets in Sublime Text on my mac but it wasn't showing anything as a result just [Finished in 0.1s]. Is there something wrong with my sublime?

  26. Pace De La Cruz May 9, 2019 at 6:50 pm - Reply

    Appreciate the content, thank you but way too small on an iphone

  27. Dibben Nandakishor May 9, 2019 at 6:50 pm - Reply

    Hi, I am new to pyhton, just wandering when when do u ues () and []?

Leave A Comment

*