Functions in Python are easy ๐
#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)