Python Functions Tutorial: Understanding Functions, Arguments, and Returns

A comprehensive guide to Python functions covering definitions, arguments, return statements, and practical exercises to reinforce learning.

Python Functions Tutorial: Understanding Functions, Arguments, and Returns
Bro Code
985.2K views β€’ Nov 26, 2022
Python Functions Tutorial: Understanding Functions, Arguments, and Returns

About this video

#python #tutorial #course

00:00:00 functions
00:01:49 arguments
00:04:28 exercise #1
00:06:12 return
00:08:27 exercise #2
00:10:08 conclusion

# ---------- EXAMPLE 1 ----------
def display_invoice(username, amount, due_date):
print(f"Hello {username}")
print(f"Your bill of ${amount:.2f} is due: {due_date}")

# display_invoice("BroCode", 42.50, "01/02")
# display_invoice("JoeSchmo", 100.99, "02/03")

# ---------- EXAMPLE 2 ----------
def create_name(first, last):
first = first.capitalize()
last = last.capitalize()
return first + " " + last

full_name = create_name("spongebob", "squarepants")
print(full_name)

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

985.2K

Likes

27.8K

Duration

10:38

Published

Nov 26, 2022

User Reviews

4.8
(197)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.

Trending Now